We am in the process of switching our site to Git from SVN. The
deployment was working fine with SVN and Capistrano 2.2. After
switching the deployment settings over to git and upgrading to
Capistrano 2.4 I am getting the following error when I run `cap
deploy:migrations`.
* executing "cd /var/www/
mysite.com/releases/20080624225409; rake
RAILS_ENV=production db:migrate"
servers: ["
mysite.com"]
[
mysite.com] executing command
** [out ::
mysite.com] /usr/local/rubygems/gems/bin/rake:9:in
`require'
** [out ::
mysite.com] :
** [out ::
mysite.com] no such file to load -- rubygems
** [out ::
mysite.com] (
** [out ::
mysite.com] LoadError
** [out ::
mysite.com] )
** [out ::
mysite.com] from /usr/local/rubygems/gems/bin/rake:9
command finished
command "cd /var/www/
mysite.com/releases/20080624225409; rake
RAILS_ENV=production db:migrate" failed on
mysite.com
This is my deploy.rb has:
# config/deploy.rb
default_run_options[:pty] = true
set :application, "mysite"
set :repository, "g...@github.com:mysite.git"
set :user, "deploy"
set :password, "xxxxx"
set :scm, :git
set :scm_passphrase, "xxxxx"
set :git_enable_submodules, true
set :deploy_via, :remote_cache
set :branch, "master"
set :deploy_to, "/var/www/
mysite.com/"
set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
set :runner, "deploy"
set :rails_env, "production"
set :domain, "
mysite.com"
role :web, domain
role :app, domain
role :db, domain, :primary => true
set :rake_cmd, (ENV['RAKE_CMD'] || nil)
Obviously the first thing I did was check my path to see if it
included the gem command and it does:
/usr/local/rubygems/gems/bin:/usr/local/rubygems/bin:/usr/local/bin:/
usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/deploy/bin
I'm really confused why this is not working. When I redeploy using svn
repo it runs fine which is even more perplexing.