I'm moving a rails app from my desktop to a shared host, and I'm running into trouble with a gem dependency.
I have this declared in my environment.rb:
config.gem "icalendar"
When I first tried starting a console for the app, I got error messages requesting that I rake:install the gem. I used the shared hosting gem install process to install the gem in ~/ruby/gems and confirmed that the gem was there.
ls -rlt ~ruby/gems/gems/icalendar-1.1.0/
total 64
drwxr-xr-x 4 user user 4096 Dec 12 13:15 docs/
drwxr-xr-x 3 user user 4096 Dec 12 13:15 ../
drwxr-xr-x 5 user user 4096 Dec 12 13:18 test/
drwxr-xr-x 3 user user 4096 Dec 12 13:18 lib/
(I replaced the actual user/group here manually)
I then added this to my environment.rb:
ENV['GEM_PATH'] = "/home/USER/ruby/gems"
(Again, actual user replaced)
The next time I ran script/console, the app loaded fine. I then tried to start up the server, and got this error:
Missing these required gems:
icalendar
You're running:
ruby 1.8.7.22 at /usr/bin/ruby
rubygems 1.3.5 at /home/USER/ruby/gems, /usr/lib/ruby/gems/1.8
I tried tweaking the path a bit, but that didn't have any effect. I poked around a bit here and on google at large and didn't see anything that directly addressed this problem--I would think that the console and server would both use the GEM_PATH in the environment config. Doesn't look like a permissions issue either. Any ideas? Thanks for the help with this.