14

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.

austin
  • 5,816
  • 2
  • 32
  • 40
user3221045
  • 173
  • 1
  • 3
  • 8
  • I was able to migrate the DB fine. C:\rails_projects\demo_app>heroku run rake db:migrate --app sheltered-crag-4306 Running `rake db:migrate` attached to terminal... up, run.5397 == CreateUsers: migrating ......... When I try "heroku open --app sheltered-crag-4306" I get the following error on the browser "The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. If you are the application owner check the logs for more information." pardon me folks, if I am doing something silly. Please help. – user3221045 Jan 22 '14 at 21:55
  • By the way, I have also tried "http://sheltered-crag-4306.herokuapp.com", I get the same result – user3221045 Jan 22 '14 at 21:56

2 Answers2

26

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.

Mike
  • 1,852
  • 1
  • 15
  • 19
7

Assuming the name of your app is robot. On your terminal, heroku run rake db:migrate --app=robot

Oluwayetty
  • 414
  • 4
  • 7
  • Does this push the current version of the database from my computer to Heroku? Or just the structure of the database? – Greg Jun 10 '17 at 17:25
  • Nope, doesn't push any changes from your computer but migrate any pending migrations from your schema(assuming you integrated a version control tool to your App) to your Heroku app. – Oluwayetty Jan 23 '18 at 21:38