0

I have a rails application. which uses a private gem from the github.

in Gemfile:

gem 'xyz',
  git: "https://#{ENV['GITHUB_TOKEN']}:x-oauth-basic@github.com/cvb/xyz.git",
  branch: :development

I added some modifications to this gem locally. in order to test those modifications, i want to change those remote gem path's to the local gem path(the application and the gem are present in the same directory). but i don't know how to mention this local gem path in the gem file. can any body help me with the syntax, like what path should be added to the gemfile(like relative path or absolute path).

John
  • 1,273
  • 3
  • 27
  • 61
  • its not a duplicate question. its my requirement. unfortunately, i did not seen the above question. – John Aug 26 '17 at 12:45
  • One of the [answers](https://stackoverflow.com/a/14167368/8255744) in the duplicate it almost exactly what you're asking for. The most recent docs for it are [here](http://bundler.io/v1.15/man/bundle-config.1.html#LOCAL-GIT-REPOS) – Simple Lime Aug 27 '17 at 06:57

1 Answers1

0

Alright, try this:

  1. clone the gem from github.com/cvb/xyz.git
  2. modify it as you like
  3. then add this locally modified gem in your application, like:

gem "xyz", path: "/local/gem/directory/in/your/machine"

Then bundle and feel your change.

Cheers!

rony36
  • 3,277
  • 1
  • 30
  • 42