git 在 gemfile 中点 gem 分支路径
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17007277/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
point gem branch path in gemfile
提问by Pravin Mishra
How to point gem branch path in gemfile.
如何在 gemfile 中指向 gem 分支路径。
This is what i am doing :
这就是我正在做的:
gem 'rails', path: '/home/ubuntu/workspace/Fork/rails', :branch => 'any_of'
but when i run bundle update
, it's not show any branch like sprockets-rails.
但是当我跑步时bundle update
,它没有像链轮导轨那样显示任何分支。
Using sprockets-rails (2.0.0.rc4) from git://github.com/rails/sprockets-rails.git (at master)
Using rails (4.1.0.beta) from source at /home/ubuntu/workspace/Fork/rails
Is there any typo?
有错别字吗?
回答by Ismael Abreu
In your app run this command.
在您的应用程序中运行此命令。
bundle config local.rails /home/ubuntu/workspace/Fork/rails
Then in your Gemfile you specify the github source which will be overridden.
然后在您的 Gemfile 中指定将被覆盖的 github 源。
gem 'rails', :github => 'rails/rails', :branch => 'any_of'