Updating gem

Large libraries, like Rails, RSpec, Twitter Bootstrap, etc. Typically if a major version number is updating, like Rails 3.x to 4.x and RSpec 2.x to 3.x, that’s going to require lots of code changes. Going from Rails 3.x to Rails 4.x is more difficult than Rails 4.0 to Rails 4.1.

There’s a similar story with RSpec 2.x to 2.99, compared to going to RSpec 3.0.

At least you’ll be able to quickly verify a good chunk of your app can at least navigate the “happy path” as you iterate updating your gems.

If you’ve updated gems recently, sometimes you can run and everything works great.

updating gem-68updating gem-85updating gem-61

Remember to do these 2 types of searches rather than spending too much time inserting print statements or launching the debugger!If you don’t get any search hits, then typically you have some problem in app customizations (see below).Some essential places to look at when upgrading gems are: Errors or deprecation messages can come from compatibility issues among your gems. If you’re having an upgrade issue, then a concise, detailed post of a new issue typically results in a very quick response. I search for gems on Ruby Gems so often that I created a Chrome search shortcut.This might be on a specific branch of a gem, or even another user’s fork of a gem.Here’s an example of the syntax to specify the very-latest version of a gem (the tip of the master branch): Sometimes what you need is something less than the most current version, or a specific branch, or a fork of the gem. If you’ve never done this, it’s a very worthwhile thing to try out, and it’s easy!

Leave a Reply