Heroku资产预编译在i18n上失败
在将Rails4代码推向heroku时,我得到以下错误,这已经发生在最近2天内,否则这是一个平滑的过程
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 =生产耙子资产:在本地进行预编译。 虽然我不会将预编译的资产推送到服务器。
我通过我的gem文件安装了I18n-js 2.1.2版本,它的Rails4服务器为我运行。
需要紧急帮助。
提高资产版本似乎有效。 在application.rb中更改以下行:
config.assets.version = '1.0'
尝试使用以下rake任务清除您的tmp文件夹:
rake tmp:clear
这将允许Heroku对您的所有资产进行新的预编译。
我摆脱了i18n-js rails gem,以解决问题。 我用它很小,所以用我的一些小代码替换它。
在Heroku上部署时,Gem和Rails 4存在问题。
链接地址: http://www.djcxy.com/p/79997.html