Run Server with Pending Migrations

Sometime it happens that you want to run server with pending migrations.

For example you run rake db:rollback

now will have one pending migration and you want to see the effect of that migration and for this you need to run the server. Now if you will try to run server it will give you the error:


Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development

so, to get rid of this error you can comment a following line from specific environment file:

# config.active_record.migration_error = :page_load

It raise an error on page load if there are pending migrations.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s