windows heroku run rake db:migrate error “/usr/bin/env: ruby.exe: No such file or directory”

You need to change in your application first line of the 3 files:

bin/bundle
bin/rails
bin/rake

Instead

#!/usr/bin/env ruby.exe

must be

#!/usr/bin/env ruby

That’s why is error:

/usr/bin/env: ruby.exe: No such file or directory

Then you do successfully:

heroku run rake db:migrate

It’s work for me.

Leave a Comment