我目前正在托管我的应用程序,并且在执行上限时我不断收到此错误:deploy。 cap deploy:check is ok。
我不确定这意味着什么,并尝试了从stackoverflow问题建议谷歌的一切,没有任何工作。
* executing "cat /var/www/lpacarnaval/current/REVISION"
servers: ["x.xx.xx.xxx"]
[x.xx.xx.xxx] executing command
command finished in 1152ms
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/lpacarnaval/releases/20131009165153; true"
servers: ["x.xx.xx.xxx"]
[x.xx.xx.xxx] executing command
command finished in 1218ms
failed: "rvm_path=$HOME/.rvm $HOME/.rvm/bin/rvm-shell 'default' -c 'cat /var/www/lpacarnaval/current/REVISION'" on x.xx.xx.xxx
这是我的deploy.rb
load 'deploy/assets'
require "rvm/capistrano"
require "bundler/capistrano"
set :application, "lpacarnaval"
set :user, "administrador" # The server's user for deploys
set :deploy_to, "/var/www/lpacarnaval"
set :rails_env, "production"
set :keep_releases, 5
set :deploy_via, :remote_cache
set :use_sudo, false
set :rake, 'bundle exec rake'
set :scm, "git"
set :repository, "git@bitbucket.org:xxxxxxxx/xxxxxxx.git" # Your clone URL
set :branch, "master"
default_run_options[:pty] = true # Must be set for the password prompt from git to work
role :web, "x.xx.xx.xxx" # Your HTTP server, Apache/etc
role :app, "x.xx.xx.xxx" # This may be the same as your `Web` server
role :db, "x.xx.xx.xxx", :primary => true # This is where Rails migrations will run
task :bundle_install, :roles => :app do
run "cd #{release_path} && bundle install --without development test"
end
before "deploy:assets:precompile", :bundle_install
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "cd #{current_release} && bundle install --without development test"
run "touch #{File.join(current_path,'tmp','restart.txt')}"
end
task :update_crontab, :roles => :db do
run "cd #{release_path} && whenever --update-crontab #{application}"
end
namespace :assets do
task :precompile, :roles => :web, :except => { :no_release => true } do
from = source.next_revision(current_revision)
if capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0
run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
else
logger.info "Skipping asset pre-compilation because there were no asset changes"
end
end
end
after "deploy", "deploy:cleanup"
after "deploy:symlink", "deploy:update_crontab"