Skip to content

Instantly share code, notes, and snippets.

@ericchen
Last active January 6, 2018 06:49
Show Gist options
  • Save ericchen/e88a131084208846b5bc to your computer and use it in GitHub Desktop.
Save ericchen/e88a131084208846b5bc to your computer and use it in GitHub Desktop.
在Gemfile里面利用bundle修复gem插件的bug

###方法1: 可以将远端的github代码下到本地来修改,无须再自己fork一个新的项目,便于快速修改plugin中的错误, 下面是使用方法

Bundler also allows you to work against a git repository locally instead of using the remote version. This can be achieved by setting up a local override:

bundle config local.GEM_NAME /path/to/local/git/repository (bundle config local.active_shipping ~/gems/active_shipping/)

and setup the git repo pointing to a branch: gem 'active_utils', :github => 'Shopify/active_utils', :branch => '2.2.3'

##推荐使用方法2, 将github的源码copy到vendor下,然后在gemfile里面指定一下path##

gem 'active_utils', :path => './vendor/active_utils-3.0.0'

也可以指定其它位置

gem 'active_utils', :path => '~/gems/active_utils-3.0.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment