Rails rake assets:precompile --trace 报错 Command failed with status

popotiger · 2014年07月10日 · 最后由 popotiger 回复于 2014年07月10日 · 2797 次阅读
[popo@mac dpos]$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/popo/.rvm/rubies/ruby-1.9.2-p320/bin/ruby /home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/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/popo/.rvm/rubies/ruby-1.9.2-p320/b...]
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils.rb:45:in `call'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils.rb:45:in `sh'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils_ext.rb:40:in `sh'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils.rb:80:in `ruby'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils_ext.rb:40:in `ruby'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/actionpack-3.2.2/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/actionpack-3.2.2/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/actionpack-3.2.2/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:227:in `call'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:227:in `block in execute'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:222:in `each'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:222:in `execute'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/home/popo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:152:in `invoke'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:140:in `invoke_task'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:98:in `block (2 levels) in top_level'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:98:in `each'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:98:in `block in top_level'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:107:in `run_with_threads'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:92:in `top_level'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:70:in `block in run'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:157:in `standard_exception_handling'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:67:in `run'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/bin/rake:37:in `<top (required)>'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/rake:23:in `load'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/rake:23:in `<main>'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/ruby_executable_hooks:15:in `eval'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => assets:precompile

求大神看看是什么问题?

系统:Linux mac 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 内存:512M

看这个帖子:http://stackoverflow.com/questions/14991365/command-failed-with-status-when-precompiling-assets

难道是我内存太少?

还真看不出问题,错误信息里面原因没说明白

另外楼主 512M 还装 64 位系统?

#1 楼 @huacnlee 感谢这么晚能回复,刚申请的 aliyun 服务器,想先测试下。

看看开发环境运行 js 有没有报错

#3 楼 @dddd1919

没有报错,我在另外一台电脑上编译是成功的,不过 512m 内存确实寒碜,即使编译通过,同时启动 unicorn 和 mysql 也不得行,哈哈。

@huacnlee

需要 登录 后方可回复, 如果你还没有账号请 注册新账号