# Cannot find gem for Rails =1.1.2

**URL:** <https://www.ruby-forum.com/t/cannot-find-gem-for-rails-1-1-2/59735>\
**Category:** Rails\
**Created:** [May 5, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/cannot-find-gem-for-rails-1-1-2/59735 "2006-05-05T21:58:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Crowley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@Chris\_Crowley](https://www.ruby-forum.com/u/Chris_Crowley)\
**Post date:** [May 5, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/cannot-find-gem-for-rails-1-1-2/59735/1 "2006-05-05T21:58:54Z")

</div>

First post here:

The error is below and i’m sure folks have posted it before, but perhaps  
i’ve missed the solution:

I’m using apache because i first need to see if rails can work with  
apache. Some particulars:  
gem -v  
0.8.11

ruby -v  
ruby 1.8.4 (2005-12-24) [i686-linux]

rails -v  
Rails 1.1.2

rails-1.1.2 is installed (via gem) and environment.rb’s  
RAILS\_GEM\_VERSION=‘1.1.2’

In the browser:  
Rails application failed to start properly.

The apache error log:  
[Fri May 05 11:15:53 2006] [error] [client 127.0.0.1] Cannot find gem  
for Rails =1.1.2:  
[Fri May 05 11:15:53 2006] [error] [client 127.0.0.1] Install the  
missing gem with ‘gem install -v=1.1.2 rails’, or  
[Fri May 05 11:15:53 2006] [error] [client 127.0.0.1] change  
environment.rb to define RAILS\_GEM\_VERSION with your desired version.

---

<div class="post-metadata">

**Author:** ![Chris\_Crowley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@Chris\_Crowley](https://www.ruby-forum.com/u/Chris_Crowley)\
**Post date:** [May 7, 2006, 5:32pm UTC](https://www.ruby-forum.com/t/cannot-find-gem-for-rails-1-1-2/59735/2 "2006-05-07T17:32:55Z")

</div>

Chris Crowley wrote:

> First post here:
> 
> The error is below and i’m sure folks have posted it before, but perhaps  
> i’ve missed the solution:
> 
> I’m using apache because i first need to see if rails can work with  
> apache. Some particulars:  
> gem -v  
> 0.8.11
> 
> ruby -v  
> ruby 1.8.4 (2005-12-24) [i686-linux]
> 
> rails -v  
> Rails 1.1.2
> 
> rails-1.1.2 is installed (via gem) and environment.rb’s  
> RAILS\_GEM\_VERSION=‘1.1.2’
> 
> In the browser:  
> Rails application failed to start properly.
> 
> The apache error log:  
> [Fri May 05 11:15:53 2006] [error] [client 127.0.0.1] Cannot find gem  
> for Rails =1.1.2:  
> [Fri May 05 11:15:53 2006] [error] [client 127.0.0.1] Install the  
> missing gem with ‘gem install -v=1.1.2 rails’, or  
> [Fri May 05 11:15:53 2006] [error] [client 127.0.0.1] change  
> environment.rb to define RAILS\_GEM\_VERSION with your desired version.

If you are under shared hosting this will help

check de boot.rb hack

[http://wiki.onrails.com.ar/onrailscomarwiki/show/Instalacion+de+Rails+y+Gems+en+un+hosting+compartido](http://wiki.onrails.com.ar/onrailscomarwiki/show/Instalacion+de+Rails+y+Gems+en+un+hosting+compartido)

Pedro V.  
[http://blogs.onrails.com.ar](http://blogs.onrails.com.ar)

---

<div class="post-metadata">

**Author:** ![Chris\_Crowley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@Chris\_Crowley](https://www.ruby-forum.com/u/Chris_Crowley)\
**Post date:** [May 7, 2006, 8:31pm UTC](https://www.ruby-forum.com/t/cannot-find-gem-for-rails-1-1-2/59735/3 "2006-05-07T20:31:52Z")

</div>

if you’re trying to setup your app on a host i assume that they don’t  
got rails 1.1.2 yet? in that case the best thing to do is probaly freeze  
rails.

just type

rake rails:freeze:gems

and you’re all set to go.

---

<div class="post-metadata">

**Author:** ![Chris\_Crowley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e480ec/32.png) [@Chris\_Crowley](https://www.ruby-forum.com/u/Chris_Crowley)\
**Post date:** [May 8, 2006, 10:47pm UTC](https://www.ruby-forum.com/t/cannot-find-gem-for-rails-1-1-2/59735/4 "2006-05-08T22:47:14Z")

</div>

thanks for the responses (which i don’t have.) When i moved my gems,  
into a gem directory within my ruby lib directory, things worked better.  
I had installed rubygems in a separate branch of my home-dir, from the  
ruby branch, also in my home dir. Unfortunately, I have deleted your  
response re. the cache which seemed relevant. When i debugged this via  
boot.rb, i recall it did lead to the return of an empty cache. When i  
made the same call from within my own straight-ruby (ie. w/o the whole  
apache mess) test program, i did get something back interestingly  
enough. Sorry if this isn’t clear. Anyhow, i’m off to the next step,  
which is FastCGI, then mysql, then postgresql.

This is what i had done, that didn’t work:

installed ruby:

|./configure --prefix=/home/chris  
etc.  
|

installed rubygems:

|export GEM\_HOME=/home/chris/gems  
ruby setup.rb config --prefix=/home/chris  
etc.  
|

and then of course i installed rails via rubygems.

The gems ended up in /home/chris/gems/gems/ ! Moving them to:  
/home/chris/lib/ruby/gems/1.8/gems/  
helped. I’ll play with my rubygems install next time (on the actual  
production machine.)

chris.
