Heroku: "Process exited with status 127" after deploying ruby app

heroku, rake, ruby, ruby-on-rails

Solution

After some hours trying different solutions, this is the only thing that worked for me:

rake rails:update:bin

And push the changes again to Heroku.

Problem

After deploying some changes to Heroku, I am getting the following error (even if I revert the changes). ``` » heroku web.1 - - Starting process with command `bin/rails server -p 59617 -e production` » app web.1 - - /usr/bin/env: ruby : No such file or directory » heroku web.1 - - Process exited with status 127 » heroku web.1 - - State changed from starting to crashed ``` Seems that my app does not understand ruby anymore. These are my files in /bin: bundle ``` #!/usr/bin/env ruby ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) load Gem.bin_path('bundler', 'bundle') ``` rails ``` #!/usr/bin/env ruby APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' ``` rake ``` #!/usr/bin/env ruby require_relative '../config/boot' require 'rake' Rake.application.run ``` heroku run "gem env"

Original source