# RubyGems mysteriously broken (paths issue?)

**URL:** <https://www.ruby-forum.com/t/rubygems-mysteriously-broken-paths-issue/113526>\
**Category:** Ruby\
**Created:** [September 1, 2007, 4:56am UTC](https://www.ruby-forum.com/t/rubygems-mysteriously-broken-paths-issue/113526 "2007-09-01T04:56:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eeby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@eeby](https://www.ruby-forum.com/u/eeby)\
**Post date:** [September 1, 2007, 4:56am UTC](https://www.ruby-forum.com/t/rubygems-mysteriously-broken-paths-issue/113526/1 "2007-09-01T04:56:04Z")

</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)  
Web-application framework with template engine, control-flow  
layer,  
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:

- VERSION: 0.9.0 (0.9.0)
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- GEM PATH:
  - /var/lib/gems/1.8

- REMOTE SOURCES:
  - [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:** ![eeby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@eeby](https://www.ruby-forum.com/u/eeby)\
**Post date:** [September 1, 2007, 6:01am UTC](https://www.ruby-forum.com/t/rubygems-mysteriously-broken-paths-issue/113526/2 "2007-09-01T06:01:08Z")

</div>

On 9/1/07, Eeby [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> \*\*\* LOCAL GEMS \*\*\*
> 
> - REMOTE SOURCES:
> - [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.

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

---

<div class="post-metadata">

**Author:** ![eeby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@eeby](https://www.ruby-forum.com/u/eeby)\
**Post date:** [September 1, 2007, 6:46am UTC](https://www.ruby-forum.com/t/rubygems-mysteriously-broken-paths-issue/113526/3 "2007-09-01T06:46:12Z")

</div>

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

Yes, that corrected the problem. Thanks.

---

<div class="post-metadata">

**Author:** ![eeby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecb155/32.png) [@eeby](https://www.ruby-forum.com/u/eeby)\
**Post date:** [September 9, 2007, 8:14pm UTC](https://www.ruby-forum.com/t/rubygems-mysteriously-broken-paths-issue/113526/4 "2007-09-09T20:14:48Z")

</div>

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.

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