Reputation: 61
I'm running the run rake db:migration command and terminal is telling 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've already bundle installed and committed changes to git.
I've looked all over StackOverflow and I cannot find the answer
Can someone point me in the right direction
Upvotes: 6
Views: 7901
Reputation: 33
See if the gem sqlite is in development only.
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
Upvotes: 1
Reputation: 1
To check to see if your app deployed correctly just look at the trace in your shell after you attempt to push to Heroku. I had been running mine in Cloud 9 and not really looking at the results because they were so small, I'm new to this, and, heck, it had always deployed perfectly before....
When I scrolled through I found two errors mentioned; I corrected these errors, then the heroku db migration ran fine. One error was a missing line of code, the other I found on SO (which I can't refind the link to, sorry), and it had to do with the file extensions for my css files, which I changed from .css to .css.scss.
Upvotes: 0
Reputation: 79
I had the same problem,
The cause was that I hadn't specified a remote branch when first pushing to Heroku, Heroku apps start with a blank repository – they have no branches and no code. So the first time you deploy, you need to specify a remote branch.
git push heroku master
I hadn't done this initially and in doing so this fixed my rake problem.
Upvotes: 7