I'm having issues running deploy tasks in Webistrano. This only when I run Webistrano from Nginx with Phusion Passenger.
When I run Webistano with the following command, everything runs fine.
ruby script/server -d -p 3000 -e production
But when running it from from Phusion Passenger (compiled with "passenger-install-nginx-module") and I want to do a deploy (the application is running) I get the following error in my log:
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `materialize': Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:172:in `specs_for'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:161:in `requested_specs'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/environment.rb:23:in `requested_specs'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:11:in `setup'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:107:in `setup'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/setup.rb:17
My bundle gemlist:
Gems included by the bundle:
* actionmailer (2.3.11)
* actionpack (2.3.11)
* activerecord (2.3.11)
* activeresource (2.3.11)
* activesupport (2.3.11)
* bundler (1.1.5)
* capistrano (2.6.0)
* erubis (2.7.0)
* exception_notification (2.3.3.0)
* highline (1.6.13)
* mocha (0.9.8)
* mysql (2.8.1)
* net-scp (1.0.4)
* net-sftp (2.0.5)
* net-ssh (2.5.2)
* net-ssh-gateway (1.1.0)
* open4 (0.9.3)
* rack (1.1.3)
* rails (2.3.11)
* rake (0.9.2.2)
* syntax (1.0.0)
This is in my nginx.conf :
passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.15;
passenger_ruby /usr/local/bin/ruby;
And my specific server config:
passenger_enabled on;
rails_env production;
It's strange that running this with WeBrick just works as it should, but passenger via nginx isn't. I'm not very into Ruby, and I don't really know where I should start looking.
I install ruby from the source, no rvm.
Thanks in advance!
Edit:
The error comes from this line :
ruby script/runner -e production ' deployment = Deployment.find(1085); Webistrano::Deployer.new(deployment).invoke_task! '
Works as aspected when executed from commandline, but doesn't when executed from within the app via nginx/passenger.