"heroku run rake db:migrate" issue

user3221045 picture user3221045 · Jan 22, 2014 · Viewed 18.8k times · Source

Folks, I am following Ruby on Rails Tutorial and working on the DemoApp in Chapter 2. My env is :

Win 7
Ruby 1.9.3
Rails 4.0.2

I have deployed the demo app (under directory demo_app) locally and have tested it out locally as well. I did push it to Heroku using

c:\rails_projects\demo_app heroku create --stack cedar
c:\rails_projects\demo_app git push heroku master

the app gets deployed to heroku.

When I run: heroku run rake db:migrate I get the error:

No app specified. Run this command from an app folder or specify which app to use with --app APP.

I have run it with heroku run rake db:migrate --app demo_app but get the same error. Not sure what to do.

Answer

Mike picture Mike · Jan 22, 2014

Heroku will have given your app a random name when you created the app. Run heroku apps from the terminal to get the name of your app, then heroku run rake db:migrate --app your_app_name.