1

Why does nginx+passenger fail to start and print this into error.log?

Could not find addressable-2.3.6 in any of the sources (Bundler::GemNotFound)
 /usr/local/share/gems/gems/bundler-1.7.8/lib/bundler/spec_set.rb:92...

My RoR app is installed in /var/www/html/ and I ran bin/bundle from that directory:

$ bin/bundle install --deployment
Using addressable 2.3.6...
It was installed into ./vendor/bundle

The gem is under vendor/bundle:

$ ls vendor/bundle/ruby/1.9.1/gems/ | grep address
addressable-2.3.6

Part of Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.3.6)...

Nginx passenger configuration in /etc/nginx/conf.d/passenger.conf:

passenger_root /usr/local/share/gems/gems/passenger-4.0.53/;
passenger_ruby /usr/bin/ruby; ...

nginx site configuration in /etc/nginx/sites-enabled/*.conf

passenger_enabled on;
passenger_set_cgi_param RAILS_ENV production;

I tried setting passenger_set_cgi_param GEM_PATH /var/www/html/vendor/bundle/ruby/1.9.1/gems/:/usr/local/share/gems/gems/; but then I get this error:

Message from application: cannot load such file -- bundler/setup (LoadError)
  /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'...
Kevin
  • 215

0 Answers0