I first switch to a separate heroku_branch branch to keep the precompiled assets from “poluting” my git repository then merge with the master repository
$ git checkout heroku_branch
$ git merge master
I’ve done exactly what heroku’s documentation recommends with resepect to precompiling assets
$ RAILS_ENV=production bundle exec rake assets:precompile
/Users/bagvoo/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/bagvoo/.rvm/gems/ruby-1.9.2-p290@upvote/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
/Users/bagvoo/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/bagvoo/.rvm/gems/ruby-1.9.2-p290@upvote/bin/rake assets:precompile:nondigest RAILS_ENV=production RAILS_GROUPS=assets
$ git add .
$ git commit -m "vendor compiled assets"
Then I push to the heroku repository using
$ git push heroku master
However, I don’t get
-----> Preparing Rails asset pipeline
Detected manifest.yml, assuming assets were compiled locally
Instead I get:
----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
undefined method `blamed_files' for nil:NilClass
(in /tmp/build_6x7f3k642z8z/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
Precompiling assets failed, enabling runtime asset compilation
There is a public/assets/manifest.yml so I don’t understand why heroku is trying to precompile these things…
The problem is that I was pushing from the wrong branch.
Was
Is
This is specific to the case above where you have a separate branch from the master branch that you are pushing from.