gems not loading and causing Internal Server Error

I'm running rails 2.1.2 on a hostmonster.com server where I don't have
control over the web server for restarts. My problem is that I can
install gems, but they don't seem to work and my app can never find them
and throws errors.

The relevant lines in my environment.rb

I have seen stuff like this before and it was environment issues...
The rake command was running from a different install of ruby than the
console/server scripts...

Did you install ruby from source and maybe you have the rpms for ruby
installed...

Hi,

I think I'm having a very similar problem as you have. I have it with
openid plugin:
http://www.ruby-forum.com/topic/170134#new

I can use the gem after setting ENV['GEM_PATH'] =
'/home/mydomain/ruby/gems'

But rake is broken, I can't migrate, or do anything with it, even
script/about complains about the gem.

I´ve spent 2 days with it with no luck.

Regards

Freddy Andersen wrote:

I have seen stuff like this before and it was environment issues...
The rake command was running from a different install of ruby than the
console/server scripts...

Did you install ruby from source and maybe you have the rpms for ruby
installed...

I didn't install rails, it came pre-installed on my account under
hostmonster.com. That would explain why freezing rails doesn't fix the
problem since I don't believe ruby is frozen with rails. I am going to
try to install my own version of ruby and rails and see if that somehow
fixes the problem.

I did a manual install of ruby and rails following the "HOWTO: Rails 2
on hostmonster" (google it). Also, I installed my gems using the
--install-dir option:

$ gem install acts_as_secure --install-dir
/home/my_website/ruby1.8/lib/ruby/gems/1.8

Now I can use script/console with no problem. I still have a "Internal
Server Error", but I'm hoping that goes away when they restart the web
server. I'm not sure if I could have used the --install-dir option on
the original version of ruby installed, but it's possible that might
have fixed it too.

To get "Internal Server Error" to go away I needed to fix the shebang
line on my public/dispatch.fcgi file.