Using bundler, you can do something like this in the Gemfile
:
gem \'my_gem\', :git => \'git@github:me/my_gem.git\'
That builds
Because unlike typical Git repositories, GitHub builds gems, if the project is hosted on GitHub and the gem is found in the source list then you can add GitHub to your sources list like this:
$ gem sources -a http://gems.github.com
and then later install gems as desired in a single step, like this:
$ sudo gem install username-projectname
Otherwise, there's no one-step solution, and you'll have to do something like this:
gem build .gemspec
sudo gem install -x.x.x.gem