title: Gemfile: A better way to conditionally declare local or remote gems for multiple developers
body: <p>Our group has several people, any number of which may be working on any combination of gems. Currently, our Gemfile has stuff like this:</p>
  
  <pre><code>gem 'awesome-gem', :git =&gt; 'git@github.com:somebody/awesome-gem.git'
  # gem 'awesome-gem', :path =&gt; '/Users/developer-A/workspace/awesome-gem'
  
  # gem 'rad-gem', :git =&gt; 'git@github.com:somebody/rad-gem.git', :branch =&gt; 'release'
  gem 'rad-gem', :path =&gt; '/some/path/specific-to/developer-B/rad-gem'
  </code></pre>
  
  <p>So developer-A was working on awesome-gem locally, and when they finished up, they just replaced their :path the gem's :git location and committed both to version control. developer-B and C do the same thing for rad-gem, each has a different :path in their locally modified Gemfile and if the Gemfile every has real changes, they have to undo their local :path setup, commit, undo to point back to their local version of rad-gem, etc.</p>
  
  <p>This is both a pain and ugly, so I tried to come up with a better solution but the best I could come up with is something like this:</p>
  
  <pre><code>if ENV['RADGEM_PATH']
    gem 'rad-gem', :path =&gt; ENV['RADGEM_PATH']
  else
    gem 'rad-gem', :git =&gt; 'git@github.com:somebody/rad-gem.git', :branch =&gt; 'release'
  end
  </code></pre>
  
  <p>This allows developer-B and C to set their own rad-gem path while removing much of the pain mentioned above. however, it is still ugly and I'm wondering if there is a better way to do this, possibly using groups?</p>