Rodrigo Urubatan – About Code

Helping ruby developers to use the best tools for each job so they can solve hard problems, with less bugs and have more free time.

Menu
  • Home
  • My last presentations
  • About
  • Privacy Policy
Menu

ActiveRecord Migration UI gem

Posted on July 22, 2019July 22, 2019 by urubatan

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?

Share this:

  • Twitter
  • Facebook
  • LinkedIn
  • Reddit
  • Pocket
  • WhatsApp

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Receive the latest posts by email!

Last posts

  • ActiveRecord Migration UI gem
  • Beware of Date.yesterday on your code (A timezone history)
  • How to create a request scope for your rails application
  • Random collection of Git Tips and Tricks
  • 6 Lessons From CrossFit That will help your developer career (Or any other career in the matter of fact)

Search

© 2019 Rodrigo Urubatan – About Code | Powered by Minimalist Blog WordPress Theme