I believe you should provide the source for the gem like this:
gem 'foo', :git => 'https://my_username:my_password@github.com/my_github_account/my_repo.git'
If this is not an option for you, you might need to setup your own gem server or vendor the gem