Steven Guevarra
Steven Guevarra

Reputation: 31

Ruby on Rails: Cannot run the command 'heroku run rails db:seed'

I just need this run this command in order for my Heroku application's to be in synced with my Workspace's database. But when I run this command, it says that I have 9 pending migrations. I ran rails db:migrate then heroku run rails db:seed, but I still have the same pending migrations.

Upvotes: 0

Views: 508

Answers (2)

widjajayd
widjajayd

Reputation: 6253

Below some steps to run migration and check application in heroku

heroku run rake db:migrate
heroku run rake db:seed

I know you did it, but you also need to restart the dyno so it will load new schema with this command below

heroku restart 

run the server

heroku ps:scale web=1

check the server status

heroku ps

if you get web.1: starting .... then your dyno is ready you can open now with

heroku open

Upvotes: 0

P. Boro
P. Boro

Reputation: 776

When you execute rails db:migrate it will migrate your local database. To migrate Heroku database you have to use this command heroku run rails db:migrate

Upvotes: 1

Related Questions