Rails Production预编译资产

时间:2013-01-09 11:11:31

标签: ruby-on-rails ruby-on-rails-3

当我尝试为生产预编译资产时,它会出现以下错误,请帮我解决这个问题,我需要发布..,

RAILS_ENV=production bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/ubuntu/.rvm/rubies/ruby-1.9.3-p327/bin/ruby /home/ubuntu/.rvm/gems/ruby-1.9.3-p327/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Command failed with status (): [/home/ubuntu/.rvm/rubies/ruby-1.9.3-p327/b...]
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/file_utils.rb:45:in `call'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/file_utils.rb:45:in `sh'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/file_utils_ext.rb:40:in `sh'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/file_utils.rb:80:in `ruby'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/file_utils_ext.rb:40:in `ruby'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/task.rb:227:in `call'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/task.rb:227:in `block in execute'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/task.rb:222:in `each'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/task.rb:222:in `execute'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/task.rb:152:in `invoke'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:141:in `invoke_task'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:99:in `block (2 levels) in top_level'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:99:in `each'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:99:in `block in top_level'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:108:in `run_with_threads'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:93:in `top_level'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:71:in `block in run'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327@global/gems/rake-10.0.2/bin/rake:37:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327/bin/rake:19:in `load'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327/bin/rake:19:in `<main>'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile

1 个答案:

答案 0 :(得分:0)

解决了这个问题,这是我的CPU问题,CPU排在前100%,并且预编译过程超时了que进程。

我已停止所有剩余的正在运行的进程并已编译,资产已完美编译。

谢谢@phoet