Heroku run rake db: migrate error "/ usr / bin / env: ruby2.2: There is no such file or directory"

I am new to Rails and I am following this guide. I successfully clicked my application on the hero, but I cannot make the database migrate.

I am using a virtual machine with an 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 do not understand what I can do. I tried to use

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

but it did not help.

+6
source share
1 answer

The solution that worked for me is that for each file in the bin my project, I changed the first line:

#!/usr/bin/env ruby2.2

to

#!/usr/bin/env ruby

+5
source

Source: https://habr.com/ru/post/983189/


All Articles