开发者

Bundler via Capistrano on production seems to always unnecessarily reinstall everything

For so开发者_JAVA百科me reason bundler isn't just installing needed gems not already installed. Instead it's re-installing everything in my Gemfile. Is there are way to get it to only install needed gems (they it works for me in development mode).

Capistrano 2.6.0

Bundler 1.0.12

Ubuntu 10.04 server 32-bit

Task Snippet:

task :bundle_gems, :roles => :app do
  run "cd #{deploy_to}/current && bundle install --path vendor/gems RAILS_ENV=production"
end


Bundler actually comes with a Capistrano recipe that does everything for you. Add this to config/deploy.rb:

require "bundler/capistrano"

Remove your self-written bundle_gems task and Capistrano will automatically bundle your gems, optimised for deployment.

There's a bit more information here: http://gembundler.com/deploying.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜