gem: integrate change from pull request

依然范特西╮ 提交于 2019-12-08 18:03:51

问题


I am having issues with a gem and found that someone was able to fix it in this pull request:

https://github.com/rheaton/carrierwave-video/pull/13

How can I integrate this change into my app locally since it has been merged yet?


回答1:


Assuming you're using Bundler, you can specify the repository and branch to use for the gem in your Gemfile (it also supports specifying a tag or a reference hash, but a branch should work for your case). In this case, it might look something like:

gem 'carrierwave-video', :git => 'git://github.com/elja/carrierwave-video.git', :branch => 'patch-1'

or, more concisely:

gem 'carrierwave-video', :github => 'elja/carrierwave-video', :branch => 'patch-1'

This isn't a great long-term solution, since the branch is unlikely to continue to keep up to date properly, and might disappear, so you should probably switch back to the default as soon as the pull request is resolved.



来源:https://stackoverflow.com/questions/19057754/gem-integrate-change-from-pull-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!