title: Best way to update all of RVM rubies and gems after system update?
body: <p>I'm seeking a more streamlined and robust approach to keeping my rvm environment intact after an OS update.  I'm using Mountain Lion, rvm 1.18.16 and homebrew, which has readline, gettext, libxml2, libxslt, qt, gtk+ -- the gems that usually break for me are nokogiri and capybara-webkit</p>
  
  <p>Twice now after updating Mountain Lion and XCode, my native extension gems and Ruby have suffered breakage and I have to spend time getting everything working again.  I have to wonder if I'm following the best practice for getting all the rvm components updated after such system update.</p>
  
  <p>What typically happens is that gems with native extensions are linking against old libraries that are no longer available, especially with the libxml issues surrounding Mountain Lion.  Here's the basic steps I take to get my system back online across all projects (I have about 8 versions of Ruby installed under rvm, so this is tedious!).</p>
  
  <p>First, update Mountain Lion and XCode via the App Store.</p>
  
  <p>Second, Update homebrew with:</p>
  
  <pre><code>brew update
  brew upgrade
  </code></pre>
  
  <p>Then list your rubies and start recompiling each one with...</p>
  
  <pre><code>rvm list
  rvm reinstall ruby-1.9.2-p290
  rvm reinstall ruby-1.9.3-p392
  ...
  </code></pre>
  
  <p>NOTE:  I did try: </p>
  
  <pre><code>rvm all do reinstall
  </code></pre>
  
  <p>but that gave me this error: "reinstall: command not found"</p>
  
  <p>Next up, step through each ruby and perform pristine on the gems (this has side effect of recompiling all native extension gems):</p>
  
  <pre><code>rvm use ruby-1.9.3-p392
  gem pristine --all
  </code></pre>
  
  <p>Finally, go to each project and perform the following:</p>
  
  <pre><code>bundle install
  </code></pre>
  
  <p>I'm not sure if that last step is strictly necessary -- some projects seemed to be ok, some weren't, but running this seemed to clear up last remaining issues.</p>
  
  <p>Surely there's a more streamlined way to manage this process!?  I've only been using both Mountain Lion and rvm for a couple months, but in that time, two system updates have killed most of my working Ruby environment.  I have a lot of Ruby versions installed because of my job as a consultant and encountering many development environments, so I'd really like to get this down to an easily repeatable process.</p>
  
  <p>Any thoughts?  Can the above be further improved?</p>