My App dường như được triển khai một cách chính xác nhưng tôi nhận được lỗi này:Lỗi nội dung biên dịch của Capistrano - tài sản: biên dịch trước: nondigest?
* executing "cd /home/deploy/tomahawk/releases/20120208222225 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
servers: ["ip_address"]
[ip_address] executing command
*** [err :: ip_address] /opt/ruby/bin/ruby /opt/ruby/bin/rake assets:precompile:nondigest RAILS_ENV=production RAILS_GROUPS=assets
Tôi đã thử các giải pháp vào đây để cố gắng để biên dịch tài sản: http://lassebunk.dk/2011/09/03/getting-your-assets-to-work-when-upgrading-to-rails-3-1/
Và đây: http://railsmonkey.net/2011/08/deploying-rails-3-1-applications-with-capistrano/
Và tại đây: http://dev.af83.com/2011/09/30/capistrano-rails-3-1-assets-can-be-tricky.html
Đây là triển khai của tôi.rb:
require "bundler/capistrano"
load 'deploy/assets'
set :default_environment, {
'PATH' => "/opt/ruby/bin/:$PATH"
}
set :application, "tomahawk"
set :repository, "repo_goes_here"
set :deploy_to, "/home/deploy/#{application}"
set :rails_env, 'production'
set :branch, "master"
set :scm, :git
set :user, "deploy"
set :runner, "deploy"
set :use_sudo, true
role :web, "my_ip"
role :app, "my_ip"
role :db, "my_ip", :primary => true
set :normalize_asset_timestamps, 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
Tôi có chính xác như nhau khi triển khai ứng dụng đường ray 3.1 của tôi. Tôi nghĩ rằng đó là ẩn trong [sprockets rake task] (https://github.com/rails/rails/blob/master/actionpack/lib/sprockets/assets.rake) ở đâu đó, nhưng tôi không thấy nó. Nó có thể là nhiệm vụ 'tiền biên dịch: tài sản: nondigest' ghi lại cảnh báo cho stderr hay cái gì đó, và điều này được chọn bởi capistrano? – HectorMalot
Để nói cho bạn biết sự thật, công cụ này là một chút trong phạm vi hiểu biết của tôi (vẫn gói đầu của tôi xung quanh biên dịch trước :) - nhưng tôi đã giới thiệu cho bạn bè và anh ấy nói điều này ... "Tôi không nghĩ rằng đó là lỗi tại tất cả Tôi nghĩ rằng đầu ra là sai lầm bằng cách nào đó, nghĩ rằng một dòng lỗi của nó khi sử dụng đầu ra bình thường miễn là triển khai kết thúc bạn nên được tốt, một lỗi thực sự ngừng thực hiện – fatfrog