I keep getting the following error when trying to deploy my application using the bundle / install option:
failed: "sh -c 'cd /home/deploy/swamp/releases/20110903003336 && bundle install --gemfile /home/deploy/swamp/releases/20110903003336/Gemfile --path /home/deploy/swamp/shared/bundle --deployment --quiet --without development test'" on 12.345.678.98
** Update - it looks like I missed an error:
[err :: 12.345.678.98] sh: bundle: not found
I tried this in my deploy.rb:
require "bundler/capistrano"
and I tried this:
namespace :bundler do task :create_symlink, :roles => :app do shared_dir = File.join(shared_path, 'bundle') release_dir = File.join(current_release, '.bundle') run("mkdir -p #{shared_dir} && ln -s #{shared_dir} #{release_dir}") end task :bundle_new_release, :roles => :app do bundler.create_symlink run "cd #{release_path} && bundle install --without test" end end after 'deploy:update_code', 'bundler:bundle_new_release'
I also ported my package to the vendor path using this:
bundle install
I donβt think this is a permissions problem, because I can manually log in with the installation and installation of the package directly on the server without problems. Here is the whole deploy.rb file:
require "bundler/capistrano" set :application, "swamp" set :domain, "12.345.678.98" set :repository, " git@github.com :***/**.git" set :deploy_to, "/home/deploy/#{application}" set :rails_env, 'production' set :branch, "master" role :app, domain role :web, domain role :db, domain, :primary => true set :deploy_via, :remote_cache set :scm, :git set :user, "deploy" set :runner, "deploy" ssh_options[:port] = **** set :use_sudo, false after "deploy", "deploy:cleanup" namespace :deploy do desc "Restarting mod_rails with restart.txt" task :restart, :roles => :app, :except => { :no_release => true } do run "touch #{current_path}/tmp/restart.txt" end [:start, :stop].each do |t| desc "#{t} task is a no-op with mod_rails" task t, :roles => :domain do ; end end end task :after_update_code do run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml" end