How can I modify an existing *.gem file? I want to modify a Rakefile in a gem so that it will be able to compile on Windows.
Download its source code into a separate folder (perhaps from github). Then modify your Gemfile to point to the source directly so that you can edit it and test your changes directly.
For example, let's say that you want to edit the secure_headers gem and that you've cloned it into ~/workspace/secureheaders. Then you can use the following in your Gemfile:
gem 'secure_headers', :path => "~/workspace/secureheaders"
Then, just modify the source files inside the source tree and you should be able to see your changes applied directly.
You can gem unpack
it, add your modification, then modify the gemspec if necessary and build it again:
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