Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku run rake db:migrate error “/usr/bin/env: ruby2.2: No such file or directory”

I'm brand new to Rails and I'm following this tutorial. I successfully pushed my app to heroku, but I can't get the database migrate.

I use a virtual machine with ubuntu server .

I typed:

$ heroku run rake db:migrate

and got this error:

Running `rake db:migrate` attached to terminal... up, run.3356
/usr/bin/env: ruby2.2: No such file or directory

I don't understand what I can do. I tried to use

$ heroku run rails db:migrate
$ rake rails:update:bin

but it didn't help.

like image 259
Sergey Avatar asked Mar 01 '15 17:03

Sergey


1 Answers

the solution that worked for me is that for every file in the bin directory of my project, i changed the first line from:

#!/usr/bin/env ruby2.2

to

#!/usr/bin/env ruby

like image 162
user2635088 Avatar answered Nov 06 '22 17:11

user2635088