I would like to link my vendor folder so I don't have 5 minutes down time every time I deploy and have to run开发者_StackOverflow社区 bundle install --deployment.
Thanks!
May be you can use a rake task after the capistrano deploy, for example.
One option is to create a new task to symlink vendor to the shared path and set it to run before bundle:install
, but this is a little unnecessary - it'd be nicer to just bundle to the shared path in the first place instead of vendor.
If you're requiring and using 'bundler/capistrino' in your deploy.rb file, all you need to do is set bundle_dir
and bundler will pick it up:
set :bundle_dir, File.join(fetch(:shared_path), 'bundle')
If you've written your own bundle task, set the variable as above, then use --path #{fetch(:bundle_dir)}
in the task.
Updating to the latest version of Capistrano helped.
精彩评论