将Rails4代码推送到heroku时,我收到以下错误,该错误已在最近两天内开始发生,否则会很顺利

 Writing config/database.yml to read from DATABASE_URL
  -----> Preparing app for Rails asset pipeline
   Running: rake assets:precompile
   rake aborted!
   couldn't find file '/tmp/build_b6402ff8-bda2-4bc5-95dc-2efe7a9044bc/tmp/i18n-js.cache'
   (in /tmp/build_b6402ff8-bda2-4bc5-95dc-2efe7a9044bc/vendor/bundle/ruby/2.0.0/gems/i18n-js-2.1.2/vendor/assets/javascripts/i18n/translations.js.erb)
   /tmp/build_b6402ff8-bda2-4bc5-95dc-2efe7a9044bc/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:87:in `resolve'

这是我的production.rb中的条目
config.assets.initialize_on_precompile = true

我可以在本地运行RAILS_ENV=production rake assets:precompile。尽管我没有将预编译的 Assets 推送到服务器。

我通过我的gem文件安装了I18n-js 2.1.2版本,它的Rails4服务器正在为我运行。

最佳答案

提升 Assets 版本似乎可行。更改application.rb中的以下行:

config.assets.version = '1.0'

10-07 19:10
查看更多