Heroku使用rails预编译资产

时间:2014-07-15 14:07:33

标签: ruby-on-rails heroku

我在运行" git push heroku master"时发现了这个错误。我已经在stackoverflow上尝试了所有可用的解决方案,但对我来说并不起作用。

gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:60:in `block       (2 levels) i
n define'
       Tasks: TOP => assets:precompile
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !

 !     Push rejected, failed to compile Ruby app

To git@heroku.com:aqueous-eyrie-6143.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:aqueous-eyrie-  6143.git'

这是我的生产日志

1 个答案:

答案 0 :(得分:0)

您应该在本地计算机上运行rake assets:precompile RAILS_ENV=production并在推送到heroku之前查看production.log可能的错误