Reputation: 7893
How to extract source code of specific gem so that it is possible to edit it locally? Shall I add it to my Rails application folder?
I need that to be able to make changes to the gem's code.
Upvotes: 0
Views: 1304
Reputation: 6555
If you find an error in gem, you'd better make pull request on GitHub. But let's suppose you need your private fork of gem. Best workflow for that:
git clone https://github.com/author/awesome_gem.git
.gem awesome_gem, path: "/local/path/to/awesome_gem"
bundle install
Now you can make changes to the gem locally, and have your project use local copy of it. When you are done making initial changes, push your Gem to your github repository, and change Gemfile line to something like:
gem awesome_gem, github: 'QQQ/awesome_gem'
('QQQ' being your Github's account name)
Upvotes: 6