I haven't done this in the past, so may be I am missing something here.
I changed the Gem files for 'ruby-git' locally and it worked fine. I forked a gem and made same changes to it, in my Github repo.
While building the Sinatra app to push it to Heroku, I changed the Gemfile as follows:
gem 'git', :git => "git://github.com/silverSpoon/ruby-git.git"`
When I run bundle install, I get
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rugged 0.21.0
Using sinatra 1.4.5
Using git 1.2.8 from git://github.com/silverSpoon/ruby-git.git (at master)
Your bundle is complete!
⇒ gem list git, it doesn't show the gem as installed. ⇒ bundle show git, it shows the path where the gem repo was installed -/Users/jatinganhotra/.rvm/gems/ruby-2.1.3@527website/bundler/gems/ruby-git-c7fb35af1a99irb and do a 2.1.3 :001 > require 'git'LoadError: cannot load such file -- git Am I missing something silly here?
Gems installed by Bundler through git are not handled the same way as normal gems:
Because Rubygems lacks the ability to handle gems from git, any gems installed from a git repository will not show up in
gem list. They will, however, be available after runningBundler.setup.
In order to use the gem you need to do it through Bundler. Either use bundle exec when launching IRB or your app, or use Bundler.setup from within your code.
$ bundle exec irb
> require 'git' # should work ok
or:
$ irb
> require 'bundler/setup'
> require 'git' # should also work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With