部署heroku应用程序时,我得到推送拒绝错误(预编译资产失败)

时间:2016-04-08 16:33:49

标签: ruby-on-rails heroku

这是我试图推送heroku的应用:https://github.com/kunokdev/flightmap但是我得到<Table columnDefinitions={columnDefinitions}> <Row columnDefinitions={columnDefinitions}> <Cell/> <Cell/> <Cell/> </Row columnDefinitions={columnDefinitions}> <CustomRow columnDefinitions={columnDefinitions}/> </Table> 错误并且Precompiling assets failed登录。可能导致这种情况的原因是什么?

Push rejected to ...

这是我的宝石文件:

remote:        /tmp/build_b9c70fb95f66f6b57f7d5868507a42de/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-3.0.4/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote:        Tasks: TOP => assets:precompile
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to flightmap.
remote: 
To ssh://git@heroku.com/flightmap.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@heroku.com/flightmap.git'
kunok@Kunok:~/dev/flightmap$ 

1 个答案:

答案 0 :(得分:0)

正如@ 7urkm3n建议终端命令RAILS_ENV=production bundle exec rake assets:precompile解决问题。