开发者

Bundler via Capistrano on production seems to always unnecessarily reinstall everything

开发者 https://www.devze.com 2023-03-19 03:14 出处:网络
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

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

精彩评论

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

关注公众号