title: Retrieve sources for all installed gems
body: <p>I'm in the process of switching all my projects over to using the rather wonderful rvm and bundler.  On one of them, i want to basically mirror the gem environment on the server which hosts the app.</p>
  
  <p>In order to do this, i did the following: </p>
  
  <ul>
  <li>went onto the server</li>
  </ul>
  
  <p>-did "gem list" which gave me a big list of gems like </p>
  
  <pre><code>actionmailer (2.2.2)
  actionpack (2.2.2)
  activerecord (2.2.2)
  activeresource (2.2.2)
  activesupport (2.2.2)
  amatch (0.2.3)
  archive-tar-minitar (0.5.2)
  etc
  </code></pre>
  
  <ul>
  <li>copied this into a new Gemfile in my local project folder</li>
  <li>did a bit of find and replace to change the format into the Gemfile-friendly format</li>
  <li>added the gem sources that i knew about to the top of the Gemfile</li>
  <li>did "bundle install"
  -FAIL</li>
  </ul>
  
  <p>The fail is happening because there's always some gem that can't be found because the source isn't specified.  So, what i was wondering was</p>
  
  <p>a) on the server, is there any way to query the installed gems to get a list of the sources where each was installed from?</p>
  
  <p>b) is this even a good way to do it?  Would it be better to somehow export the gems that are on the server, and install them directly in my new gemset, rather than try to install them from remote sources?  Or something else?</p>
  
  <p>grateful for any advice - max</p>