You could do one of the following:
1.: Use the :git option in your Gemfile for direct git(hub) access
gem 'gemname', :git => 'git://github.com/foo'
2.: Use the :path option in your Gemfile for local access
gem 'gemname', :path => '/path/to/foo'
3.: Install the local gem and use it in your Gemfile
# command line
gem install '/path/to/foo'
# Gemfile
gem 'foo'