# Missing the Rails gem on ubuntu

**URL:** <https://www.ruby-forum.com/t/missing-the-rails-gem-on-ubuntu/152147>\
**Category:** Rails\
**Created:** [October 30, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/missing-the-rails-gem-on-ubuntu/152147 "2008-10-30T15:29:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tatyree](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f14d63/32.png) [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Post date:** [October 30, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/missing-the-rails-gem-on-ubuntu/152147/1 "2008-10-30T15:29:46Z")

</div>

I’ve just deployed a second 2.1.0 app on to a long-running ubuntu  
8.0.4 box. The first app, which lives in the same top level  
directory, runs fine. The new app, however, mostly refuses to run  
(mongrel will start, but I can’t migrate or start the console),  
raising this error:

“Missing the Rails 2.1.0 gem. Please `gem install -v=2.1.0 rails`,  
update your RAILS\_GEM\_VERSION setting in config/environment.rb for the  
Rails version you do have installed, or comment out RAILS\_GEM\_VERSION  
to use the latest version installed.”

If I comment out the RAILS\_GEM\_VERSION, then it throws this instead:

“Missing the Rails gem. Please `gem install -v= rails`, update your  
RAILS\_GEM\_VERSION setting in config/environment.rb for the Rails  
version you do have installed, or comment out RAILS\_GEM\_VERSION to use  
the latest version installed.”

The gem is definitely there, as the other app–which has a virtually  
identical envrionment.rb (a few more requires)–runs fine.

Any suggestions?

Best,  
Todd

---

<div class="post-metadata">

**Author:** ![tatyree](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f14d63/32.png) [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Post date:** [October 30, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/missing-the-rails-gem-on-ubuntu/152147/2 "2008-10-30T16:20:05Z")

</div>

Hi Todd

I had the same problem on my development machine, basically some of  
the instructions out there are less than satisfactory (hint hint:  
Agile Web D. with Rails)… I solved the problem by  
completely removing rails, ruby, and mysql/sqlite3, and starting again  
using the following satisfactory guides:

[https://help.ubuntu.com/community/RubyOnRails](https://help.ubuntu.com/community/RubyOnRails)

and for the database (just go to the database section):  
[http://wiki.rubyonrails.org/rails/pages/RailsOnUbuntu](http://wiki.rubyonrails.org/rails/pages/RailsOnUbuntu)

good luck!

---

<div class="post-metadata">

**Author:** ![tatyree](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f14d63/32.png) [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Post date:** [October 30, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/missing-the-rails-gem-on-ubuntu/152147/3 "2008-10-30T18:16:23Z")

</div>

Hi Nellboy,

I got it in the end by freezing the gems. Less than ideal, but it’s  
not a public facing app so my customer service pixies will just have  
to live with it if it falls over.

Thanks,  
todd
