views:

34

answers:

2

I am trying to setup my rails application on my vps running ubuntu 10. I am using passenger with apache to run my app. When I try to go to my application url, I get the error, "ruby (rack) application could not be started. Missing rails 2.3.8 gem"

I have the gem installed. So, to debug a little more, I put a print statement in boot.rb to see where it is looking for the rails gem and this is what the gem path it printed:

/home/mahesh/.gem/ruby/1.8/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8

In the command line, I ran gem env and the gem path output is:

 - /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8
 - /home/mahesh/.gem/ruby/1.8

I don't know how the gem path is getting messed up. It looks like it is appending the two gem paths.

In my .bashrc, I have

GEM_PATH=/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems

I am stuck. I would really appreciate if someone can help me figure this out. thanks!

A: 

I've always had luck running Ruby interpreters and gems galore with RVM - you might try setting that up and installing REE through that. Keep in mind when you install gems with RVM you don't use sudo. Installation guide is here:

http://rvm.beginrescueend.com/rvm/install/

There are some Ubuntu-specific notes here:

http://rvm.beginrescueend.com/os/ubuntu/

Hope that helps!

codykrieger
I had gone down the rvm path and had run into some weird ruby bug. It looks like the latest version fixed it but I still have the same problem with gem paths. I have one other application which seems to be running fine. Not sure what is going on with this app. I will try to dig into it more. Thanks!
maheshmurthy
Hmm, strange. Let us know if you come up with anything for a fix!
codykrieger
A: 

It turned out to be a conflict with rack gem versions. I had 1.1.0 and 1.2.1 installed. I removed 1.2.1 and everything works fine now!

maheshmurthy