Heroku launches rake db: migrate error rake command not found

I run the rake db: mig command and the terminal tells me that rake is not a command

$ heroku run rake db:migrate --app"glacial-lake-5597" Running `rake db:migrate --appglacial-lake-5597` attached to terminal... up, run.1930 bash: rake: command not found $ heroku run rake db:migrate Running `rake db:migrate` attached to terminal... up, run.4588 bash: rake: command not found 

I have already installed and committed changes to git.

I looked at StackOverflow and cannot find the answer

Can someone point me in the right direction

+6
source share
3 answers

I had the same problem

The reason was that I did not specify the remote branch, when I first click on Heroku, Heroku applications start from a clean repository - they have no branches and no code. Therefore, during the first deployment, you need to specify the remote branch.

git push heroku master

I did not do this initially, and at the same time it fixed my problem with rake.

+5
source

See if only sqlite stone is under construction.

like this

 group :development do gem 'sqlite3' gem 'web-console' gem 'listen', '~> 3.0.5' gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end 
+1
source

To check if your application is deployed correctly, just look at the footprint in your shell after you try to click on Heroku. I worked with mine in Cloud 9 and did not look at the results because they were so small that I am new to this and, damn it, it always deploys perfectly to ...

When I scroll, I found two errors; I fixed these errors, then the heroku db migration went fine. One error was a missing line of code, another that I found on SO (which I cannot redo the link, sorry), and this is due to file extensions for my css files, which I changed from .css to .css.scss.

0
source

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


All Articles