I have an app which I have pushed successfully several times which has just started crashing when I try to push it to heroku.
I thought the only change I made was to a yaml config file and so I replaced that file with an earlier version but the crash continues. Any thoughts on how to track this down?
heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 38838`
app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- rails_config/sources/yaml_source (LoadError)
app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rails_config-0.3.1/lib/rails_config.rb:4:in `<top (required)>'
[Added – 12/13/12] Interestingly – cloning the local repo and creating a new Heroku app with it works fine, so it looks to be something with the instance rather than the repo. Touching a file an redeploying doesn’t fix it tho’.
Turns out this was a problem in the .slugignore.
I diagnosed this by looking at how Heroku built the bundle and reproducing that locally:
Checking the resulting bundle I confirmed that the missing yaml_source file (from rails_config) was indeed present. Then I remembered half noticing that the slug compiler had said that it was removing 3 files rather than the usual 1.
I have a top level ‘sources’ directory which I was trying to exclude with
in the .slugignore file. This was matching the sources directory in the gem. Changed the entry to the intended
and all is good again.
This leaves the observation that Heroku seems to be using different versions of the Slug Compiler in different instances and it appears to have changed. (My app works on a different instance and .slugignore file has been incorrect for a long time)