【发布时间】:2019-11-04 18:07:19
【问题描述】:
我尝试按照以下方式添加操作文本:https://stackoverflow.com/a/55983943。
在开发过程中一切正常。
但是当我尝试通过运行 git push heroku 将它推送到 heroku 时,我得到了这个错误:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sampleapp.
remote:
remote:
To https://git.heroku.com/sampleapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sampleapp.git'
我尝试添加
config.assets.initialize_on_precompile = false
到 config/application.rb 但它不起作用
它已经添加到 config/environments/production.rb。
我尝试运行 RAILS_ENV=production bundle exec rake assets:precompile 但它给了我这个错误:
ExecJS::RuntimeError: SyntaxError: Unexpected token: string (actiontext)
JS_Parse_Error.get ((execjs):3538:621)
那么,我该如何解决这个错误呢?
【问题讨论】:
标签: ruby-on-rails heroku