I am attempting to deploy a Rails application (which works fine in development) onto a production server. I have installed and configured Apache, Passenger, and the necessary gems. After I restart apache and navigate to the server, I get the following error:
Exception PhusionPassenger::UnknownError in PhusionPassenger::Railz::ApplicationSpawner (no such file to load -- money (MissingSourceFile))
gem list money
shows:
*** LOCAL GEMS ***
money (3.0.5)
An irb
session on the server:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'money'
=> true
The gem is required in config/environment.rb
:
require 'money'
What's going on here?
Edit: The gem was installed as root:
# ls -l /usr/lib/ruby/gems/1.8/gems/money-3.0.5/lib
total 8
drwx------ 2 root root 4096 Sep 2 10:26 money
-rw-r--r-- 1 root root 1284 Sep 2 10:26 money.rb
Edit 2: After having no success with that roadblock, I realized that Passenger is sort of made to go along with Ruby Enterprise Edition, so I tried installing that. Afterwards, I used Ruby Enterprise's version of gem to install all the required gems. Now when I restart apache and navigate to my server, I get:
Exception LoadError in PhusionPassenger::Railz::ApplicationSpawner (no such file to load -- logger)
I have no problem requiring logger in either the old or new versions of Ruby:
# which irb
/usr/bin/irb
# irb
irb(main):001:0> require 'logger'
=> true
irb(main):002:0> exit
# /opt/ruby-enterprise-1.8.7-2010.02/bin/irb
irb(main):001:0> require 'logger'
=> true
Something must be going on with paths or permissions, but I followed the instructions in both the Passenger and Ruby Enterprise Edition installers exactly. Any other ideas?