How to use bundle package on my edited gem?
I'm trying to freeze a particular gem (with my edits) so I ca开发者_如何学JAVAn push the modified version to Heroku. Per this discussion, I'm using bundle package
to save copies of my existing gems into vendor/cache
, but on closer inspection, it turns out this bundles the original server version of the gem, not my version.
I've verified that the files specified in bundle show gdata
include my edits, which I thought would point the bundler to that version. The bundle-package doc states that it only operates on .gem files (so not the installed gem directory?).
How can I freeze my particular version of the gem?
Copy your modified gem into a folder like vendor/gems
, and then point to that version in your Gemfile:
gem "modified_gem", :path => "vendor/gems/modified_gem"
And don't forget to check vendor/gems
into version control.
Sorry for the brevity of this answer, let me know if you need clarification.
精彩评论