Search for '{{search_term}}'

Linking RubyGems to GitHub or other VCS

CMOS is the Code-Maven Open Source podcast that also includes video interviews. Subscribe to this feed RSS feed with your Podcast listener app or via iTunes iTunes.

Having a Public Version Control system for your project is quite important, make it easy for people to find it. RubyGems makes it very easy.

Since the release of version 2 of RubyGems we can add any field to the metadata key.

In order to include the source_code_uri key add the following to the gempspec file of your project replacing the the URL with the one that matches your project.

  gem.metadata = {
    "source_code_uri" => "",

Some people put the URL of their GitHub Repository in the gem.homepage fields. That's ok, but it would be prefereble to also put it in the source_code_uri field.


In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by Disqus