# RubyGems mysteriously broken (paths issue?)

**URL:** <https://rubytalk.org/t/rubygems-mysteriously-broken-paths-issue/40308>\
**Category:** ruby-talk\
**Created:** [1 September 2007 02:55 UTC](https://rubytalk.org/t/rubygems-mysteriously-broken-paths-issue/40308 "2007-09-01T02:55:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eeby](https://avatars.discourse-cdn.com/v4/letter/e/ecb155/32.png) [@Eeby](https://rubytalk.org/u/Eeby)\
**Post date:** [1 September 2007 02:55 UTC](https://rubytalk.org/t/rubygems-mysteriously-broken-paths-issue/40308/1 "2007-09-01T02:55:05Z")

</div>

Just installed RubyGems 0.9.0 on Ubuntu 7.04. I ran gem install rails  
and it said that it worked successfully.

But tried to run "rails mynewapp" and got "bash: rails: command not  
found".

Ran...

# gem list -l rails

\*\*\* LOCAL GEMS \*\*\*

rails (1.2.3)  
&nbsp;&nbsp;&nbsp;&nbsp;Web-application framework with template engine, control-flow  
layer,  
&nbsp;&nbsp;&nbsp;&nbsp;and ORM.

So the rails gem was installed. I tried...

# gem contents rails  
Unable to find gem 'rails' in default gem paths

So gem list rails works, but gem contents rails doesn't work.

So I checked what gem thinks its environment is...

# gem environment  
Rubygems Environment:  
&nbsp;&nbsp;- VERSION: 0.9.0 (0.9.0)  
&nbsp;&nbsp;- INSTALLATION DIRECTORY: /var/lib/gems/1.8  
&nbsp;&nbsp;- GEM PATH:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- /var/lib/gems/1.8  
&nbsp;&nbsp;- REMOTE SOURCES:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- [http://gems.rubyforge.org](http://gems.rubyforge.org)

/var/lib/gems/1.8 actually does contain "bin/" "cache/" "doc/" "gems/"  
"source\_cache" "specifications/". Within that, the gems/ dir does  
indeed contain dirs for all the gems I've just installed such as  
rails, actionmailer, mongrel, and several others.

Any help to fix this would be greatly appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![Hemant\_Kumar](https://avatars.discourse-cdn.com/v4/letter/h/46a35a/32.png) [@Hemant\_Kumar](https://rubytalk.org/u/Hemant_Kumar)\
**Post date:** [1 September 2007 03:58 UTC](https://rubytalk.org/t/rubygems-mysteriously-broken-paths-issue/40308/2 "2007-09-01T03:58:30Z")

</div>

Please remove the rubygems package that you installed using apt-get,  
its broken. Download the tgz file of rubygems from rubyforge.org and  
install rubygems using that. Everything will be fine after that.

> **···**
>
> On 9/1/07, Eeby \<elektrophyte@yahoo.com\> wrote:
> 
> > Just installed RubyGems 0.9.0 on Ubuntu 7.04. I ran gem install rails  
> > and it said that it worked successfully.
> > 
> > But tried to run "rails mynewapp" and got "bash: rails: command not  
> > found".
> > 
> > Ran...
> > 
> > # gem list -l rails
> > 
> > \*\*\* LOCAL GEMS \*\*\*
> > 
> > rails (1.2.3)  
> > &nbsp;&nbsp;&nbsp;&nbsp;Web-application framework with template engine, control-flow  
> > layer,  
> > &nbsp;&nbsp;&nbsp;&nbsp;and ORM.
> > 
> > So the rails gem was installed. I tried...
> > 
> > # gem contents rails  
> > Unable to find gem 'rails' in default gem paths
> > 
> > So gem list rails works, but gem contents rails doesn't work.
> > 
> > So I checked what gem thinks its environment is...
> > 
> > # gem environment  
> > Rubygems Environment:  
> > &nbsp;&nbsp;- VERSION: 0.9.0 (0.9.0)  
> > &nbsp;&nbsp;- INSTALLATION DIRECTORY: /var/lib/gems/1.8  
> > &nbsp;&nbsp;- GEM PATH:  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- /var/lib/gems/1.8  
> > &nbsp;&nbsp;- REMOTE SOURCES:  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- [http://gems.rubyforge.org](http://gems.rubyforge.org)
> > 
> > /var/lib/gems/1.8 actually does contain "bin/" "cache/" "doc/" "gems/"  
> > "source\_cache" "specifications/". Within that, the gems/ dir does  
> > indeed contain dirs for all the gems I've just installed such as  
> > rails, actionmailer, mongrel, and several others.
> > 
> > Any help to fix this would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [9 September 2007 18:13 UTC](https://rubytalk.org/t/rubygems-mysteriously-broken-paths-issue/40308/3 "2007-09-09T18:13:18Z")

</div>

RubyGems 0.9.0 has a security exploit. 0.9.4 is the latest.

> **···**
>
> On Aug 31, 2007, at 19:55, Eeby wrote:
> 
> > Just installed RubyGems 0.9.0 on Ubuntu 7.04. I ran gem install rails  
> > and it said that it worked successfully.
> 
> --  
> Poor workers blame their tools. Good workers build better tools. The  
> best workers get their tools to do the work for them. -- Syndicate Wars

---

<div class="post-metadata">

**Author:** ![Eeby](https://avatars.discourse-cdn.com/v4/letter/e/ecb155/32.png) [@Eeby](https://rubytalk.org/u/Eeby)\
**Post date:** [1 September 2007 04:45 UTC](https://rubytalk.org/t/rubygems-mysteriously-broken-paths-issue/40308/4 "2007-09-01T04:45:11Z")

</div>

> Please remove the rubygems package that you installed using apt-get,  
> its broken. Download the tgz file of rubygems from rubyforge.org and  
> install rubygems using that. Everything will be fine after that.

Yes, that corrected the problem. Thanks.
