Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku run rake db:migrate error rake command not found

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

like image 224
Nicholas Yaworsky Avatar asked Feb 06 '15 09:02

Nicholas Yaworsky


2 Answers

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.

like image 156
Ross Hamilton Avatar answered Oct 21 '22 06:10

Ross Hamilton


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
like image 41
Paulo Avatar answered Oct 21 '22 04:10

Paulo