ruby on rails - Bundler on production server can't find any gems -
i using passenger + nginx deploy rails app. problem having bundler not finding gems when tries install them. instance, getting error:
could not find i18n-0.6.1 in of sources (bundler::gemnotfound)
if log onto production box , manually install gem, error goes away, next gem needed cannot found. why this? not using rvm. here config file:
worker_processes 1; events { worker_connections 1024; } http { passenger_root /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.0.rc4; passenger_ruby /usr/local/bin/ruby; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name .treadforth.com; root /var/www/tread-forth/current/public; passenger_enabled on; } }
edit: should add nginx running root. possible path issue, installing gems manually allows bundle recognize installed not sure.
if you're using capistrano, need add line below config/deploy.rb
require 'bundler/capistrano'
unless add that, capistrano won't run bundle install
on remote server while deploying. adds --deployment
option installs gems under shared/bundle
, thereby making nice separated gem environment app.
Comments
Post a Comment