Last Updated: March 11, 2017
·
212
· iamnan

Can't Update Gems in Rails 5

If you're migrating a Rails app to Rails 5, you might run into a problem when you just try to update the versions of your previous Gemset to current version. Some Gems are not compatible with previous versions, or Rails 5 gems, and you'll get dependency errors when you try to run bundle update.

And just one such gem can cause a cascade of dependency problems.

One gem in particular is almost guaranteed to cause the whole update to fail, and that is the venerable quiet_assets gem. Once useful in keeping sprockets from cluttering the developer console log with unnecessary noise, the gem itself is now unnecessary and can be removed from Gemfile. Your bundle will likely update now.

The log noise from sprockets will come back now. To get rid of it again, set assets' quiet flag in your development configuration:

# app/config/environments/developer.rb
config.assets.quiet = true

Back to work!