capistranoでデプロイすると、capistranoがアセットを実行しようとするとエラーが発生し、ロールバックされます:プリコンパイル。プリコンパイルを、それが正常に実行/ webappsに/ myappに/電流から:私は熊手資産を実行する場合rails/capistrano - アセットをコンパイル中にエラーが発生する
私はレール3.2.1、バンドラ1.0.22、カピストラーノ2.11.2
を使用しています。
エラー:
failed: "sh -c 'cd /webapps/myapp/releases/20120304160347 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'"
deploy.rbが
require "bundler/capistrano"
load 'deploy/assets'
set :application, "myapp"
set :domain, '24.17.71.95'
set :repository, "."
set :deploy_via, :copy
set :local_repository, '/home/me/myapp/.git'
set :deploy_to, '/webapps/myapp/'
set :scm, :none #:git
set :user, 'me'
set :password, 'me$pw'
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
default_run_options[:pty] = true
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
set :branch, 'master'
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
before "deploy:assets:precompile", "bundle:install"
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
でアドバイスをしてみてください。 – Brad
、わずか1〜2分かかります。 –
サーバにsshで接続し、cd/webapps/myapp/current && bundle exec rakeを実行するとどうなりますか?RAILS_ENV = production RAILS_GROUPS = assets assets:precompile? –