title: Managing different Rails versions in different git branches with RVM
body: <p>I'm working on a project that runs on Rails <code>~&gt; 3.0</code> on the <code>master</code> branch, and <code>~&gt; 3.1</code> on another branch.</p>
  
  <p>Obviously those 2 branches need different gemsets.</p>
  
  <p>Do you know of a convenient way of handling the situation using RVM?</p>
  
  <p>I've thought of a couple options, none of them optimal:</p>
  
  <ul>
  <li><p><strong>using <code>gemset</code>s</strong> I would have to remember to manually switch <code>gemset</code> after each <code>git checkout</code></p></li>
  <li><p><strong>using <code>bundle package</code></strong> I would have to track the <code>vendor/bundle</code> directory</p></li>
  <li><p>a mix of the two approaches is not even possible, since <code>.bundle/config</code> is not tracked</p></li>
  <li><p>I could write a <code>git</code> <code>post-checkout</code> hook, but it sounds a bit hacky (hardcoded branch names and all that)</p></li>
  </ul>
  
  <p>Is there a better way that I'm failing to think of?</p>