PageSourceSearch

https://shakacode.com/component---src-template-blog-article-tsx-co…nd-resque-index-mdx-d5c5f3b29bddf8dcf071.js

js shakacode.com collected 2026-10-04 00:25:11 UTC 49,543 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkgatsby_starter_default=self.webpackChunkgatsby_starter_default||[]).push([[544],{88645:function(e,a,t){t.r(a),t.d(a,{Head:function(){return f},default:function(){return b}});var n=t(28453),s=t(96540);function r(e){const a=Object.assign({p:"p",a:"a",h1:"h1",span:"span",ol:"ol",li:"li",h2:"h2",h3:"h3",strong:"strong",em:"em"},(0,n.R)(),e.components);return s.createElement(s.Fragment,null,s.createElement(a.p,null,"What are the best-practices for upgrading gems to newer versions? What\nsort of tips and techniques can save time and headaches?"),"\n",s.createElement(a.p,null,"I built this guide based on my real-world experiences over years of gem\nmigrations, including a recent upgrade to Rails 4.1, RSpec 3.0, and\nTwitter Bootstrap 3.2. There are some more specific examples of errors\nyou might encounter at this article on the Rails on Maui blog: ",s.createElement(a.a,{href:"http://railsonmaui-octopress.dev/blog/2014/09/12/specific-issues-upgrading-gems-to-rails-4-dot-1-and-rspec-3/"},"Specific\nIssues Upgrading Gems to Rails 4.1, RSpec 3, and Twitter\nBootstrap 3.2"),"."),"\n",s.createElement(a.h1,{id:"why-update",style:{position:"relative"}},s.createElement(a.a,{href:"#why-update","aria-label":"why update permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Why Update?"),"\n",s.createElement(a.p,null,"Here's my favorite reasons for keeping gems relatively current:"),"\n",s.createElement(a.ol,null,"\n",s.createElement(a.li,null,"If you work on several projects, keeping the gems and ruby version\nconsistent makes your coding more productive as you don't have to\nkeep adjusting for which version is which. Web searches tend to find\nrelatively recent versions first. It's relatively annoying to be yak\nshaving issues that turn out to be \"oh, that doesn't work in that\nolder version of Rails\"."),"\n",s.createElement(a.li,null,"Recent versions of gems will have fixes for bugs and security\nissues, in addition to new features. With popular open source\nprojects, new bugs are quickly discovered and fixed."),"\n",s.createElement(a.li,null,"Updates are much easier if you stay relatively current. I.e., it's\nmuch easier to update from Rails 4.0 to Rails 4.1 than to go from\nRails 3.0 to Rails 4.1."),"\n"),"\n",s.createElement(a.p,null,"That being said, recent versions can have new bugs, so it's best to\navoid versions that are unreleased or that haven't aged at least a few\nweeks."),"\n","\n",s.createElement(a.h2,{id:"some-gems-will-be-way-more-difficult-to-update",style:{position:"relative"}},s.createElement(a.a,{href:"#some-gems-will-be-way-more-difficult-to-update","aria-label":"some gems will be way more difficult to update permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Some Gems Will Be Way More Difficult to Update"),"\n",s.createElement(a.p,null,"Large libraries, like Rails, RSpec, Twitter Bootstrap, etc. are going to\ntake more elbow grease to update. Typically if a major version number is\nupdating, like Rails 3.x to 4.x and RSpec 2.x to 3.x, that's going to\nrequire lots of code changes. Semantic versioning also comes into play.\nGoing from Rails 3.x to Rails 4.x is more difficult than Rails 4.0 to\nRails 4.1. There's a similar story with RSpec 2.x to 2.99, compared to\ngoing to RSpec 3.0."),"\n",s.createElement(a.h1,{id:"te
1chniques-for-smoother-gem-upgrades",style:{position:"relative"}},s.createElement(a.a,{href:"#techniques-for-smoother-gem-upgrades","aria-label":"techniques for smoother gem upgrades permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Techniques for Smoother Gem Upgrades"),"\n",s.createElement(a.h2,{id:"locking-gem-versions",style:{position:"relative"}},s.createElement(a.a,{href:"#locking-gem-versions","aria-label":"locking gem versions permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Locking Gem Versions"),"\n",s.createElement(a.p,null,"Unless you have a good reason, don't lock a gem to a specific version as\nthat makes updating gems more difficult. In general, consider only\nlocking the major Rails gems, such as rails, RSpec, and bootstrap-sass,\nas these are the ones that will likely have more involved upgrades."),"\n",s.createElement(a.h2,{id:"dont-upgrade-major-libraries-too-soon",style:{position:"relative"}},s.createElement(a.a,{href:"#dont-upgrade-major-libraries-too-soon","aria-label":"dont upgrade major libraries too soon permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Don't Upgrade Major Libraries Too Soon"),"\n",s.createElement(a.h3,{id:"3-reasons-to-wait-a-bit-before-gem-updates",style:{position:"relative"}},s.createElement(a.a,{href:"#3-reasons-to-wait-a-bit-before-gem-updates","aria-label":"3 reasons to wait a bit before gem updates permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"3 Reasons to wait a bit before gem updates:"),"\n",s.createElement(a.ol,null,"\n",s.createElement(a.li,null,s.createElement(a.strong,null,"Dependencies among gem libraries")," are not yet resolved. I had\ntried upgrading to RSpec 3 and Rails 4.1 a couple months ago, but it\nwas apparent that I had to fix to many other gems to get them to\nwork with ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">RSpec\n        3</code>'}}),". Thus, I retreated back to RSpec 2.99 for a while. Now, as of\nAugust, 2014, the gem ecosystem was ripe to move to RSpec 3.0. So\nunless you have a good reason, it's best to wait maybe a couple of\nmonths after major upgrades are released before migrating."),"\n",s.createElement(a.li,null,s.createElement(a.strong,null,"Bugs")," may be lurking in changed code. If you wait a bit, the\nearly adopters will find the bugs, saving you time and frustration.\nThe more popular a gem, the faster it will be put to rigorous use."),"\n",s.createElement(a.li,null,"*Security*/ problems may have been introduced. This is pretty much\na special case of bugs, except that this a possibility of a\nmalicious security change. If you wait a bit, hopefully somebody\nelse will discover the issue first."),"\n"),"\n",s.createElement(a.h2,{id:"dont-use-guard-zeus-spring-spork-etc-when-upgrading",style:{position:"relative"}}
1,s.createElement(a.a,{href:"#dont-use-guard-zeus-spring-spork-etc-when-upgrading","aria-label":"dont use guard zeus spring spork etc when upgrading permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Don't Use Guard, Zeus, Spring, Spork, Etc. When Upgrading"),"\n",s.createElement(a.p,null,"Tools that speed up Rails like Zeus and Spring are awesome productivity\nenhancers, ",s.createElement(a.strong,null,"except")," when upgrading gems. I found that they ",s.createElement(a.em,null,"sometimes"),"\ncorrectly reloaded new versions of gems. That means massive frustration\nwhen they are not picking up the gems you actually have specified. The\ncorollary to this is to run your tests using plain ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">rspec</code>'}})," rather than\nthe recommended ways for speeding up testing, such as the\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">parallel_tests</code>'}})," gem.."),"\n",s.createElement(a.p,null,"It's not necessary to introduce the added complexity of the test\naccelerators when doing major library updates. Once you've updated your\ngems, then try out your favorite techniques for speeding up running\ntests. I've learned the hard way on this one. The ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">pgr</code>'}})," and ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">pgk</code>'}}),"\nscripts below are awesome for ensuring that pre-loaders are ",s.createElement(a.em,null,s.createElement(a.strong,null,"NOT")),"\nrunning."),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="bash"><pre class="language-bash"><code class="language-bash"><span class="token function-name function">pgr</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n  <span class="token keyword">for</span> <span class="token for-or-select variable">x</span> <span class="token keyword">in</span> spring rails phantomjs zeus<span class="token punctuation">;</span> <span class="token keyword">do</span>\n    pgrep <span class="token parameter variable">-fl</span> <span class="token variable">$x</span><span class="token punctuation">;</span>\n  <span class="token keyword">done</span>\n<span class="token punctuation">}</span>\n\n<span class="token function-name function">pgk</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n  <span class="token keyword">for</span> <span class="token for-or-select variable">x</span> <span class="token keyword">in</span> spring rails phantomjs zeus<span class="token punctuation">;</span> <span class="token keyword">do</span>\n    <span class="token function">pkill</span> <span class="token parameter variable">-fl</span> <span class="token variable">$x</span><span class="token punctuation">;</span>\n  <span class="token keyword">done</span>\n<span class="token punctuation">}</span></code></pre></div>'}}),"\n",s.createElement(a.h2,{id:"tests-try-to-keep-and-immediately-get-tests-passing",style:{position:"relative"}},s.createElement(a.a,{href:"#tests-try-to-keep-and-immediately-get-tests-passing","aria-label":"tests try to keep and immediately get tests passing permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Tests: Try to Keep and Immediately Get Tests Passing"),"\n",s.createElement(a.p,null,"There are a lot of discussions about the value or lack of for an\nemphasis on Test-Driven Development (TDD). However, one thing that's\nindisputable is that ",s.createElement(a.em,null,s.createElement(a.strong,null,"having a large library of tests is absolutely\nhelpful for upgrading your gems")),"."),"\n",s.createElement(a.p,null,"Naturally, it's an iterative process to get tests passing when updating\ngems. First, make sure your tests suite is passing."),"\n",s.createElement(a.p,null,"You can try updating the gems one by one until you get a test failure.\nThen the issue becomes one of figuring out which related gems you might\nwant to update to fix the test failure."),"\n",s.createElement(a.p,null,"If you don't have good tests coverage, a great place to start is with\nintegration tests that do the basics of your app. At least you'll be\nable to quickly verify a good chunk of your app can at least navigate\nthe \"happy path\" as you iterate updating your gems."),"\n",s.createElement(a.h2,{id:"alternate-big-or-baby-steps",style:{position:"relative"}}
1,s.createElement(a.a,{href:"#alternate-big-or-baby-steps","aria-label":"alternate big or baby steps permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Alternate Big or Baby Steps"),"\n",s.createElement(a.p,null,"If you've updated gems recently, sometimes you can run ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">bundle update</code>'}}),"\nand everything works great. Recently, that strategy failed miserably\nwhen I tried going from Rails 4.0 with RSpec 2.2 to Rails 4.1 and RSpec\n3. An eariler attempt shortly after the releases of Rails 4.1 and RSpec\n3 clearly showed that many dependent gems would have to get updated. A\nfew months later, I still had many issues with trying to update too much\nat once."),"\n",s.createElement(a.p,null,"When this happens, take small steps and kept tests passing. I.e., don't\ndo a ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">bundle update</code>'}})," without specifying which gems to update. You might\nupdate 60 gems at once! And then when tests fail, you won't be able to\neasily decipher which dependency is the problem. Specify which gems to\nupdate by running the command:"),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="bash"><pre class="language-bash"><code class="language-bash">bundle update gem1 gem2 etc</code></pre></div>'}}),"\n",s.createElement(a.p,null,"Then after updating a few gems, run ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">rspec</code>'}})," and verify your tests pass."),"\n",s.createElement(a.p,null,s.createElement(a.strong,null,"Then commit your changes.")," Consider putting a summary of how many\ntests pass and how long it takes. The length of time is useful in case\nsome change greatly increases test run time. Or if you notice run time\nor the number of tests dramatically decrease. Plus, this ensures you ran\nthe test before committing!"),"\n",s.createElement(a.p,null,"On a related note, you can see which gems are outdated with this\ncommand: ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">bundle outdated</code>'}}),"."),"\n","\n",s.createElement(a.h2,{id:"try-bundle-update",style:{position:"relative"}},s.createElement(a.a,{href:"#try-bundle-update","aria-label":"try bundle update permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Try bundle update"),"\n",s.createElement(a.p,null,"Remember I told you not to do a ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">bundle update</code>'}}),"? Once you're getting\ncloser to finishing your gem updates, all big gems are updated, and all\ntests are passing, and deprecation warnings are addressed, then it's\ntime to run ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">bundle update</code>'}})," and then run ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">rspec</code>'}})," to see if your tests\npass. If you don't have adequate tests, then be ready to do some\nadequate manual testing. Even if you have lots of tests, you still need\nto do manual testing if you upgrade a UI library such as\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">sass-bootstrap</code>'}}),". Besides testings, check the bundler output or the diff\nof your ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">Gemfile.lock</code>'}})," to see what got updated."),"\n",s.createElement(a.h1,{id:"troubleshooting-gem-upgrades",style:{position:"relative"}}
1,s.createElement(a.a,{href:"#troubleshooting-gem-upgrades","aria-label":"troubleshooting gem upgrades permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Troubleshooting Gem Upgrades"),"\n",s.createElement(a.h2,{id:"read-error-messages-carefully-and-then-search-google-and-github-issues",style:{position:"relative"}},s.createElement(a.a,{href:"#read-error-messages-carefully-and-then-search-google-and-github-issues","aria-label":"read error messages carefully and then search google and github issues permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Read Error Messages Carefully and then search Google and Github Issues"),"\n",s.createElement(a.p,null,"Too often Ruby developers will blindly copy-paste their error messages\ninto a Google search without really reading the console output\ncarefully. This can actually waste more time, since thinking about the\nproblem for a moment can often give you a solution without Google, or\nyou'll write a better search query. If you don't find what you need on\nGoogle and you have an idea what gem is causing issues, the next place\nto search is the issues page for the gem's Github repository."),"\n",s.createElement(a.p,null,"Remember to do these 2 types of searches rather than spending too much\ntime inserting print statements or launching the debugger! If you don't\nget any search hits, then typically you have some problem in app\ncustomizations (see below)."),"\n",s.createElement(a.h2,{id:"visit-the-gem-repository-on-github",style:{position:"relative"}},s.createElement(a.a,{href:"#visit-the-gem-repository-on-github","aria-label":"visit the gem repository on github permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Visit the Gem Repository on Github"),"\n",s.createElement(a.p,null,"Some essential places to look at when upgrading gems are:"),"\n",s.createElement(a.ol,null,"\n",s.createElement(a.li,null,"README.md file (shown on the main page of repository). Some projects\nmight have a NEWS.md or CHANGELOG.md file."),"\n",s.createElement(a.li,null,"The Github issues list for a gem (and search here)"),"\n",s.createElement(a.li,null,"The Github commit history for a gem, sometimes switching branches."),"\n"),"\n",s.createElement(a.p,null,"Errors or deprecation messages can come from compatibility issues among\nyour gems. The RSpec 3 upgrade had many such issues. If you're having an\nupgrade issue, then a concise, detailed post of a new issue typically\nresults in a very quick response."),"\n",s.createElement(a.h2,{id:"try-an-rc-version-on-rubygems",style:{position:"relative"}},s.createElement(a.a,{href:"#try-an-rc-version-on-rubygems","aria-label":"try an rc version on rubygems permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Try an RC Version on RubyGems"),"\n",s.createElement(a.p,null,"Sometimes the fix you need has already been released to RubyGems in an\nRC version (RC means Release Candidate). ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">bundle update &lt;gem></code>'}})," seems to\nnot pick RC versions. You have to specify these manually. I search for\ngems on RubyGems so often that I created a Chrome search shortcut.\nHere's an example of an RC version gem that I'm currently using:"),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="ruby"><pre class="language-ruby"><code class="language-ruby">gem <span class="token string-literal"><span class="token string">\'simple_form\'</span></span><span class="token punctuation">,</span> <span class="token string-literal"><span class="token string">\'>= 3.1.0.rc2\'</span></span></code></pre></div>'}}),"\n",s.createElement(a.h2,{id:"try-a-github-gem-version-rather-than-a-rubygems-version",style:{position:"relative"}}
1,s.createElement(a.a,{href:"#try-a-github-gem-version-rather-than-a-rubygems-version","aria-label":"try a github gem version rather than a rubygems version permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Try a Github Gem Version Rather Than a RubyGems Version"),"\n",s.createElement(a.p,null,"Sometimes what you need has not been shared with RubyGems, yet the issue\nhas received commits on Github. In that case, you can use the Github\nversion of a gem. This might be on a specific branch of a gem, or even\nanother user's fork of a gem."),"\n",s.createElement(a.p,null,"For example, this image shows that the last version bump of the ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">gon</code>'}}),"\ngem is behind several commits."),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<span\n      class="gatsby-resp-image-wrapper"\n      style="position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 750px; "\n    >\n      <a\n    class="gatsby-resp-image-link"\n    href="/static/6425146ed22dbdbfb9ef05563de5c5c7/d60a6/image1.jpg"\n    style="display: block"\n    target="_blank"\n    rel="noopener"\n  >\n    <span\n    class="gatsby-resp-image-background-image"\n    style="padding-bottom: 47.87234042553191%; position: relative; bottom: 0; left: 0; background-image: url(\'data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHcc0qLE//EABgQAAIDAAAAAAAAAAAAAAAAABARAAFB/9oACAEBAAEFAgpqof/EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAEDAQE/AYf/xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/AT//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAY/Al//xAAbEAEAAgIDAAAAAAAAAAAAAAAAAUERMVFhcf/aAAgBAQABPyG2+GK/rohD/9oADAMBAAIAAwAAABAHD//EABYRAQEBAAAAAAAAAAAAAAAAAAEQEf/aAAgBAwEBPxA0T//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8QP//EACAQAQACAQIHAAAAAAAAAAAAAAEAIRExQVFhcYHR4fD/2gAIAQEAAT8QoRgMcX3A2PzvDHZnpBUnTxhQ3HKWJ//Z\'); background-size: cover; display: block;"\n  ></span>\n  <img\n        class="gatsby-resp-image-image"\n        alt="image1"\n        title=""\n        src="/static/6425146ed22dbdbfb9ef05563de5c5c7/acb04/image1.jpg"\n        srcset="/static/6425146ed22dbdbfb9ef05563de5c5c7/bc01b/image1.jpg 188w,\n/static/6425146ed22dbdbfb9ef05563de5c5c7/bf173/image1.jpg 375w,\n/static/6425146ed22dbdbfb9ef05563de5c5c7/acb04/image1.jpg 750w,\n/static/6425146ed22dbdbfb9ef05563de5c5c7/d60a6/image1.jpg 954w"\n        sizes="(max-width: 750px) 100vw, 750px"\n        style="width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;"\n        loading="lazy"\n        decoding="async"\n      />\n  </a>\n    </span>'}}),"\n",s.createElement(a.p,null,"If you needed those commits post gem release, here's an example of the\nsyntax to specify the very-latest version of a gem (the tip of the\nmaster branch):"),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="ruby"><pre class="language-ruby"><code class="language-ruby">gem <span class="token string-literal"><span class="token string">\'gon\'</span></span><span class="token punctuation">,</span> <span class="token symbol">github</span><span class="token operator">:</span> <span class="token string-literal"><span class="token string">"gazay/gon"</span></span><span class="token punctuation">,</span> <span class="token symbol">branch</span><span class="token operator">:</span> <span class="token string-literal"><span class="token string">"master"</span></span></code></pre></div>'}}),"\n",s.createElement(a.p,null,"Sometimes what you need is something less than the most current version,\nor a specific branch, or a fork of the gem."),"\n",s.createElement(a.h2,{id:"consider-forking-a-gem",style:{position:"relative"}}
1,s.createElement(a.a,{href:"#consider-forking-a-gem","aria-label":"consider forking a gem permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Consider Forking a Gem"),"\n",s.createElement(a.p,null,"Sometimes you need to fork a gem for some changes. If you've never done\nthis, it's a ",s.createElement(a.strong,null,"very worthwhile thing to try out"),", and it's easy! For\nexample, if you had wanted to update to rspec 3 sooner than later and\ndidn't want to see tons of deprecation messages, then your only option\nwas to fork the gems that had the deprecated syntax. Once you've\nverified the validity of your changes, consider submitting a pull\nrequest. Here's an example of a ",s.createElement(a.a,{href:"https://github.com/justin808/zeus-parallel_tests/commit/ccd7367d4f33ae8940a4205a164df714ccfcb42c"},"fork and commit of the\nzeus-parallel",s.createElement("sub",null,"tests")," gem that loosened a gem\ndependency"),"."),"\n",s.createElement(a.p,null,"You should typically prefer a rubygems version of a gem rather than a\ngithub version. Thus, after some months, you should try to remove any\npreviously necessary github references in your Gemfile."),"\n",s.createElement(a.h2,{id:"order-of-gems-in-your-gemfile-can-matter",style:{position:"relative"}},s.createElement(a.a,{href:"#order-of-gems-in-your-gemfile-can-matter","aria-label":"order of gems in your gemfile can matter permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Order of Gems in your Gemfile Can Matter"),"\n",s.createElement(a.p,null,"I ran into a case where including rspec-instafail before rspec resulted\nin zeus failing due to ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">rspec-instafail</code>'}})," failing to recognize that I was\nusing rspec 3. Simply placing ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">rspec-instafail</code>'}})," after loading ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">rspec</code>'}})," in\nthe Gemfile fixed that issue."),"\n",s.createElement(a.p,null,"I had a clue that was the issue due to this stack dump. Note how the\nbundler is loading rspec-instafail, and when I looked at the source\ncode, I could see why file ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">rspec_2.rb</code>'}})," was being loaded (2nd line of\nthe below stack dump)"),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="example"><pre class="language-example"><code class="language-example">zeus test                                                                                                                                                                                                 ✹ ✚ ✭ [15:37:26]\n/Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/rspec-core-3.0.3/lib/rspec/core/formatters/progress_formatter.rb:1:in `&lt;top (required)&gt;&#39;: uninitialized constant RSpec::Support (NameError)\n    from /Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/rspec-instafail-0.2.5/lib/rspec/instafail/rspec_2.rb:1:in `&lt;top (required)&gt;&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/rspec-instafail-0.2.5/lib/rspec/instafail.rb:11:in `&lt;module:RSpec&gt;&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/rspec-instafail-0.2.5/lib/rspec/instafail.rb:1:in `&lt;top (required)&gt;&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:85:in `require&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:85:in `rescue in block in require&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:68:in `block in require&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/zeus-0.13.3/lib/zeus/rails.rb:162:in `test_environment&#39;\n    from /Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/zeus-0.13.3/lib/zeus.rb:166:in `run_action&#39;\n  ...\n    from -e:1:in `&lt;main&gt;&#39;</code></pre></div>'}}),"\n",s.createElement(a.h2,{id:"evaluate-customizations",style:{position:"relative"}}
1,s.createElement(a.a,{href:"#evaluate-customizations","aria-label":"evaluate customizations permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Evaluate Customizations"),"\n",s.createElement(a.p,null,"In general, when doing relatively major gem upgrades, you really need to\nevaluate customizations to these places. Typically, deprecation messages\nwill tell you which customizations to remove or alter. Sometimes, you've\nmonkey patched some gem to work around some issue, and this would be the\nplace where you'd do that (and forget that you did it!)."),"\n",s.createElement(a.ol,null,"\n",s.createElement(a.li,null,"Any initializers in the ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">config/initializers</code>'}})," directory. Review each\nfile there."),"\n",s.createElement(a.li,null,"Any customizations in your environment files in the\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">config/environments</code>'}})," directory, such as ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">test.rb</code>'}}),",\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">development.rb</code>'}}),"."),"\n",s.createElement(a.li,null,"Any customizations for running specs: a. ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">spec/spec_helper.rb</code>'}})," b.\nEach file in the ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">spec/support</code>'}})," directory."),"\n"),"\n",s.createElement(a.h1,{id:"example-of-next-steps-when-upgrading-a-gem",style:{position:"relative"}},s.createElement(a.a,{href:"#example-of-next-steps-when-upgrading-a-gem","aria-label":"example of next steps when upgrading a gem permalink",className:"anchor before"},s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Example of Next Steps when Upgrading a Gem"),"\n",s.createElement(a.p,null,"Here's an example of where updating related gems help."),"\n",s.createElement(a.p,null,s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">bundle update capybara</code>'}})," fixed the following error"),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="example"><pre class="language-example"><code class="language-example">--------------------------------------------------------------------------------\nCapybara::RSpecMatchers::HaveText implements a legacy RSpec matcher\nprotocol. For the current protocol you should expose the failure messages\nvia the `failure_message` and `failure_message_when_negated` methods.\n--------------------------------------------------------------------------------</code></pre></div>'}}),"\n",s.createElement(a.p,null,"The final error I got was this one, from ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">cancan</code>'}}),"."),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="example"><pre class="language-example"><code class="language-example">Deprecation Warnings:\n\n`failure_message_for_should_not` is deprecated. Use `failure_message_when_negated` instead. Called from /Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/cancan-1.6.10/lib/cancan/matchers.rb:11:in `block in &lt;top (required)&gt;&#39;.\n\n`failure_message_for_should` is deprecated. Use `failure_message` instead. Called from /Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/cancan-1.6.10/lib/cancan/matchers.rb:7:in `block in &lt;top (required)&gt;&#39;.</code></pre></div>'}}),"\n",s.createElement(a.p,null,"A quick google search reveals that ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">cancancan</code>'}})," fixes the issue:"),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<span\n      class="gatsby-resp-image-wrapper"\n      style="position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 750px; "\n    >\n      <a\n    class="gatsby-resp-image-link"\n    href="/static/8a65af3429312c5e94da2f9011de9a3e/aab53/image2.jpg"\n    style="display: block"\n    target="_blank"\n    rel="noopener"\n  >\n    <span\n    class="gatsby-resp-image-background-image"\n    style="padding-bottom: 19.680851063829788%; position: relative; bottom: 0; left: 0; background-image: url(\'data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAEABQDASIAAhEBAxEB/8QAFwABAAMAAAAAAAAAAAAAAAAAAAEDBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAdyAsB//xAAVEAEBAAAAAAAAAAAAAAAAAAAQMf/aAAgBAQABBQKP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwJ//8QAGBABAAMBAAAAAAAAAAAAAAAAAQAQUYH/2gAIAQEAAT8hwL2if//aAAwDAQACAAMAAAAQeA//xAAVEQEBAAAAAAAAAAAAAAAAAAAQEf/aAAgBAwEBPxCn/8QAFREBAQAAAAAAAAAAAAAAAAAAARD/2gAIAQIBAT8QJ//EABkQAQADAQEAAAAAAAAAAAAAAAEAETEhkf/aAAgBAQABPxCmrAGq2aa+sHNZ/9k=\'); background-size: cover; display: block;"\n  ></span>\n  <img\n        class="gatsby-resp-image-image"\n        alt="image2"\n        title=""\n        src="/static/8a65af3429312c5e94da2f9011de9a3e/acb04/image2.jpg"\n        srcset="/static/8a65af3429312c5e94da2f9011de9a3e/bc01b/image2.jpg 188w,\n/static/8a65af3429312c5e94da2f9011de9a3e/bf173/image2.jpg 375w,\n/static/8a65af3429312c5e94da2f9011de9a3e/acb04/image2.jpg 750w,\n/static/8a65af3429312c5e94da2f9011de9a3e/ec60
15/image2.jpg 1125w,\n/static/8a65af3429312c5e94da2f9011de9a3e/c58a3/image2.jpg 1500w,\n/static/8a65af3429312c5e94da2f9011de9a3e/aab53/image2.jpg 1570w"\n        sizes="(max-width: 750px) 100vw, 750px"\n        style="width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;"\n        loading="lazy"\n        decoding="async"\n      />\n  </a>\n    </span>'}}),"\n",s.createElement(a.p,null,"Once I got all tests passing, I tried to update to Rails 4.1, but ran\ninto this issue:"),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="example"><pre class="language-example"><code class="language-example">bundle update rails                                                                                                                                                                                             ✹ ✭ [20:31:38]\nFetching source index from https://rubygems.org/\nResolving dependencies........................\nBundler could not find compatible versions for gem &quot;activemodel&quot;:\n  In Gemfile:\n    simple_form (&gt;= 0) ruby depends on\n      activemodel (&lt; 4.1, &gt;= 4.0.0) ruby\n\n    rails (~&gt; 4.1) ruby depends on\n      activemodel (4.1.0)</code></pre></div>'}}),"\n",s.createElement(a.p,null,"I verify I'm on the current maximum GA version of simple",s.createElement("sub",null,"form"),",\nbut I find that there's an RC version, so I specify that in the gemfile.\nIt's important to note that \"bundle update\" will tend not to pull in RC\nversions of gems, which you sometimes need after major libraries are\nupgraded."),"\n",s.createElement(a.p,null,"In ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">Gemfile</code>'}})),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="ruby"><pre class="language-ruby"><code class="language-ruby">gem <span class="token string-literal"><span class="token string">\'rails\'</span></span><span class="token punctuation">,</span> <span class="token string-literal"><span class="token string">\'~> 4.1\'</span></span>\ngem <span class="token string-literal"><span class="token string">\'simple_form\'</span></span><span class="token punctuation">,</span> <span class="token string-literal"><span class="token string">\'>= 3.1.0.rc2\'</span></span></code></pre></div>'}}),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="example"><pre class="language-example"><code class="language-example">&gt; bundle update rails simple_form\nUsing rails 4.1.4 (was 4.0.8)\nInstalling simple_form 3.1.0.rc2 (was 3.0.1)\nYour bundle is updated!</code></pre></div>'}}),"\n",s.createElement(a.p,null,"After the 4.1 upgrade, I addressed a number of deprecation warnings."),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="example"><pre class="language-example"><code class="language-example">DEPRECATION WARNING: Implicit join references were removed with Rails 4.1.Make sure to remove this configuration because it does nothing. (called from block in tsort_each at /Users/justin/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226)</code></pre></div>'}}),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="ruby"><pre class="language-ruby"><code class="language-ruby">config<span class="token punctuation">.</span>active_record<span class="token punctuation">.</span>disable_implicit_join_references <span class="token operator">=</span> <span class="token boolean">true</span></code></pre></div>'}}),"\n",s.createElement(a.p,null,"Then I got this warning with a full stack dump."),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="example"><pre class="language-example"><code class="language-example">Warning: you should require &#39;minitest/autorun&#39; instead.\nWarning: or add &#39;gem &quot;minitest&quot;&#39; before &#39;require &quot;minitest/autorun&quot;&#39;\nFrom:\n  /Users/justin/.rvm/gems/ruby-2.1.2@bpos/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require&#39;</code></pre></div>'}}),"\n",s.createElement(a.p,null,"The stack dump was useless, but the search for error message on Google\nfound ",s.createElement(a.a,{href:"https://github.com/thoughtbot/shoulda-matchers/issues/408"},"this"),"\nindicating that the issue had something to do with ",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">shoulda-matchers</code>'}}),". A\ncheck of my gem version revealed that my gem version was not current."),"\n",s.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="example"><pre class="language-example"><code class="language-example">&gt; bundle update shoulda-matchers\nInstalling shoulda-matchers 2.6.2 (was 2.5.0)</code></pre></div>'}}),"\n",s.createElement(a.p,null,"And that fixed that issue!"),"\n",s.createElement(a.p,null,"Thanks to Mike Perham, Ed Roman, Ben Ward, and Greg Lazarev for\nreviewing drafts of this article."),"\n",s.createElement(a.p,null,"Please let me know if this article helped you or if I missed anything!"),"\n",s.createElement(a.p,null,"Aloha,"),"\n",s.createElement(a.p,null,"Justin"))}var l=function(e){void 0===e&&(e={});const{wrapper:a}=Object.assign({},(0,n.R)(),e.components);return a?s.createElement(a,e,s.createElement(r,e)):r(e)},o=t(5588),i=t(65427),c=t(20504),m=t(43397),g=t(61942);const u=e=>e.replace(/\/+$/,""),d=(e,a)=>a?""+e+(a.startsWith("/")?a:"/"+a):e,h=(e,a)=>d(u(e),a),p=(e,a)=>d((e=>"undefined"!=typeof window?window.location.origin:u(e))(e),a),A=(e,a)=>{const t=(0,o.d)(a);return t?h(e,t):(e=>h(e,"/shakacode-og.png"))(e)},y=e=>{let{data:a,location:t,children:n}=e;const{frontmatter:r}=a.mdx,{siteUrl:l}=a.site.siteMetadata,o=p(l,t.pathname);return s.createElement(s.Fragment,null,s.createElement(i.A,null),s.createElement(c.A,{header:s.createElement(g.r,{breadcrumb:r.title}),main:s.createElement(s.Fragment,null,s.createElement(g.c,{body:n,title:r.title,author:r.author,date:r.date,link:o,categories:r.categories,featuredImage:r.featuredImage,showFeaturedImage:r.showFeaturedImage}),s.createElement(m.LN,null))}))};function b(e){return s.createElement(y,e,s.createElement(l,e))}const f=e=>{let{data:a,location:t}=e;const{frontmatter:n,excerpt:r}=a.mdx,{siteMetadata:l}=a.site,{siteUrl:o,title:i,description:c}=l,m=((e,a,t)=>e.excerpt||a||t)(n,r,c),g=A(o,n.featuredImage),u=h(o,t.pathname);return s.createElement(s.Fragment,null,s.createElement("title",null,n.title+" | "+i),s.createElement("link",{rel:"canonical",href:u}),s.createElement("meta",{name:"description",content:m}),s.createElement("meta",{property:"og:title",content:n.title}),s.createElement("meta",{property:"og:description",content:m}),s.createElement("meta",{property:"og:type",content:"article"}),s.createElement("meta",{property:"og:url",content:u}),s.createElement("meta",{property:"og:image",content:g}),s.createElement("meta",{name:"image",content:g}),s.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),s.createElement("meta",{name:"twitter:title",content:n.title}),s.createElement("meta",{name:"twitter:description",content:m}),s.createElement("meta",{name:"twitter:image",content:g}))}}}]);
2//# sourceMappingURL=component---src-template-blog-article-tsx-content-file-path-src-posts-upgrading-to-rails-4-and-rspec-3-with-capybara-and-resque-index-mdx-d5c5f3b29bddf8dcf071.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.