从Github分支安装Gem? [英] Install Gem from Github Branch?
问题描述
gemauthlogic,::git => git://github.com/odorcicd/authlogic.git,:branch => rails3
如何安装它作为宝石,以便测试它?
您不需要在本地构建gem。在您的gemfile中,您可以指定带有ref,branch或tag的github源文件。
gem'rails',:git => ; git://github.com/rails/rails.git,::ref => 4aded
gem'rails',:git => git://github.com/rails/rails.git,:branch => 2-3稳定
gem'rails',::git => git://github.com/rails/rails.git,:tag => v2.3.5
然后运行 bundle install
或简写形式只是包
。
阅读更多关于它的信息: http://bundler.io/man/gemfile.5.html#GIT
更新:有 github来源标识符。
gem'country_select',github:'stefanpenner / country_select'
但是,他们警告不要使用它:注意:在Bundler 2.0之前应该避免使用这种简写形式,因为它目前扩展为不安全的git:// URL。这使得中间人攻击者可以危害你的系统。
In my gemfile I have this:
gem "authlogic", :git => "git://github.com/odorcicd/authlogic.git", :branch => "rails3"
How do I install that as a gem so I can test it?
You don't need to build the gem locally. In your gemfile you can specify a github source with a ref, branch or tag.
gem 'rails', :git => "git://github.com/rails/rails.git", :ref => "4aded"
gem 'rails', :git => "git://github.com/rails/rails.git", :branch => "2-3-stable"
gem 'rails', :git => "git://github.com/rails/rails.git", :tag => "v2.3.5"
Then you run bundle install
or the short form is just bundle
.
Read more about it here: http://bundler.io/man/gemfile.5.html#GIT
Update: There's a github source identifier.
gem 'country_select', github: 'stefanpenner/country_select'
However, they warn against using it: NOTE: This shorthand should be avoided until Bundler 2.0, since it currently expands to an insecure git:// URL. This allows a man-in-the-middle attacker to compromise your system.
这篇关于从Github分支安装Gem?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!