Take the 2-minute tour ×

I have a Rails 3.2.3 app that I'm trying to push to Heroku using Ruby 2.0.0preview1 (see: http://blog.heroku.com/archives/2012/11/5/ruby-2-preview-on-heroku/).

This is an application that has been functioning properly under Ruby 1.9 and should have no issues under Ruby 2.0.0.

The errors I'm encountering are:

2012-11-07T15:19:32+00:00 heroku[web.1]: State changed from crashed to starting
2012-11-07T15:19:37+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 3225 -c ./config/unicorn.rb`
2012-11-07T15:19:38+00:00 app[web.1]: bash: bundle: command not found
2012-11-07T15:19:39+00:00 heroku[web.1]: Process exited with status 127

I logged into Heroku via bash and installed Bundler (gem install bundler) but that didn't help. I also tried changing the GEM_PATH environment variable but that doesn't seem to do anything either.

I'm racking my brain on how to fix this one. Any help is appreciated!

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

I had the same thing: solved it by creating a new Heroku app with Ruby 2.0.0 and looking at the output of "heroku config" of my app vs the new app. Then I noticed that both GEM_PATH and PATH were different, so I did:

$ heroku config:set GEM_PATH=vendor/bundle/ruby/2.0.0
$ heroku config:set PATH=bin:vendor/bundle/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin

And presto, error's gone!

(got the idea from: heroku: bash: bundle: command not found)

share|improve this answer
See also the Heroku Devcenter article Changing Ruby Version Breaks PATH. –  willglynn Nov 7 '12 at 22:04
I just received an email from Heroku on this and they recommended what you recommended. You can see the Heroku documentation on changing Ruby versions here: devcenter.heroku.com/articles/changing-ruby-version-breaks-path –  cobrabyte Nov 7 '12 at 22:36
add comment

Your Answer


