I've switched a ruby app (using Thoth, which uses Ramaze in turn) over to work inside an rvm ruby@gemset combo, with bundler. I can access the console version of it, so it's happy about what gems it has. However, when i try and access it via the server, (via passenger under nginx) i get this error from passenger:
Could not find activesupport-2.3.8 in any of the sources (Bundler::GemNotFound)
I don't understand this as i do have activesupport 2.3.8 installed in the app's gemset in rvm. Perhaps passenger doesn't know about rvm, or know to use the right rvm? I'm unsure how passenger hooks into my app, and whether it needs to know about the rvm for instance. The only reference to passenger i have seen is in my nginx config block, where i say passenger_enabled on;
Has anyone else had problems of this nature?
max
EDIT: some more details about my setup:
My app is in /var/www/apps/akrotoski
This is in a rvm/gemset called ruby-1.8.7-p302@akrotoski
It just occurred to me that this might be a problem with nginx running under root. If i switch to root and do echo $PATH i get
/opt/ruby-enterprise-1.8.7-2011.01/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
If i echo $PATH in my app's rvm i get
/home/deploy/.rvm/gems/ruby-1.8.7-p302@akrotoski/bin:/home/deploy/.rvm/gems/ruby-1.8.7-p302@global/bin:/home/deploy/.rvm/rubies/ruby-1.8.7-p302/bin:/home/deploy/.rvm/bin:/opt/ruby-enterprise-1.8.7-2011.01/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
So maybe nginx/passenger is running in such a way as to not be using the rvm? Like i say i'm quite ignorant of how passenger actually hooks into an app in this way.
/etc/init.d/nginx restart. Because i have the passenger_enabled on; block in my nginx config for this app then it should pick it up automatically. I can restart the passenger-enabled app withtouch tmp/restart.txtin the application's root folder. I'll add some more details to my OP about folders etc. - Max Williamshttp://www.christopherirish.com/2010/08/25/how-to-install-rvm-on-ubuntu-10-04/comment-page-1/#comment-103and i tried that in root's .bashrc and that didn't help. So, i guess i screwed up. What's the best way to fix this do you think, ie to give root access to rvm as well? Should i just install it again as root? Will that cause conflict? - Max Williams