Ok, I just found this really cool Gem!
After many years working with Rails, I’ve seen lots of times during development that error message saying to run migrations in console like this:
ActiveRecord::PendingMigrationError ( Migrations are pending. To resolve this issue, run: bin/rails db:migrate RAILS_ENV=development ):
Or the same message when you access your application through the browser:
But the ‘activerecord-migration-ui’ gem makes that error a lot prettier, like this:
And even allows you to run the migrations through the browser, but of course you should enable that only for the development environment 😀
To install this, just add this snipped to your Gemfile (or add the gem entry to an existing :development block):
group :development do gem 'active_record_migration_ui' end
After that, do not forget to run “bundle install” and you are all set.
You’ll never see that error screen again, just the new and improved one that allows you to run your migrations from the comfort of your browser of choice 😀
For more information about the gem, to contribute or report bugs, just follow this link.
PS.: do you find useful posts about cool new gems like this?