5
我正在与Capistrano部署到我的新VPS。第一次部署(cap部署)后,一切正常(网站正在运行),但第二次部署失败的资产:预编译错误。Capistrano部署 - 资产预编译错误
我正在运行rails 3.2.13,ruby 2.0.0,rvm。
错误:
* executing "cd -- /home/rails/releases/20140116121250 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile"
servers: ["IP"]
[IP] executing command
*** [err :: IP] bash: line 1: 23406 Killed RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile
command finished in 84187ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/rails/releases/20140116121250; true"
servers: ["IP"]
[IP] executing command
command finished in 519ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'default' -c 'cd -- /home/rails/releases/20140116121250 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile'" on IP
deploy.rb文件:
set :application, "app_name"
set :repository, "git_repository"
role :web, "IP"
role :app, "IP"
role :db, "IP", :primary => true
set :user, "rails"
set :password, "password"
set :use_sudo, false
set :deploy_to, "/home/rails/"
set :deploy_via, :copy
set :normalize_asset_timestamps, false
require 'bundler/capistrano'
require "rvm/capistrano"
set :rvm_type, :system
Capfile
load 'deploy'
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
load 'config/deploy' # remove this line to skip loading any of the default tasks
我很新的Capistrano的,所以请尽量解释清楚的解决方案。感谢您的支持!
你能在控制台'rvm_path =/usr/local/rvm/usr/local/rvm/bin/rvm-shell'的默认'-c'cd -/home/rails/releases/20140116121250上运行这个命令&& RAILS_ENV =生产RAILS_GROUPS = assets资产le exec rake assets:precompile'' – Mindbreaker