Heroku assets precompile fails for i18n
On pushing the Rails4 code to heroku I get the following error, this has started happening in last 2 days, which otherwise a smooth process
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'
Here is entry from my production.rb
config.assets.initialize_on_precompile = true
I am able to run RAILS_ENV=production rake assets:precompile locally. Though I am not pushing the precompiled assets to the server.
I am get I18n-js 2.1.2 version installed through my gem files, its Rails4 server running for me.
Need urgent help.
Bumping up the asset version seems to work. Change the following line in application.rb:
config.assets.version = '1.0'
Try clearing your tmp folder using the following rake task:
rake tmp:clear
This will allow Heroku to do a fresh precompile of all of your assets.
I got rid of i18n-js rails gem, to get the problem fixed. I was using it minimally so replaced it with some small code of mine.
There are problems with the Gem and Rails 4 when deploying on Heroku.
链接地址: http://www.djcxy.com/p/79998.html上一篇: 资产预编译中的导轨失败
下一篇: Heroku资产预编译在i18n上失败