Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku assets precompile fails for i18n-js

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.

like image 572
sudhanshu Avatar asked Sep 27 '13 04:09

sudhanshu


1 Answers

Bumping up the asset version seems to work. Change the following line in application.rb:

config.assets.version = '1.0'
like image 170
andac Avatar answered Nov 08 '22 07:11

andac