如何获得特定的“提交"?来自 github 的宝石? [英] How to get a specific "commit" of a gem from github?
问题描述
我正在使用 rails_admin,并且由于它处于(非常)积极的开发中,因此出现了错误时不时地.
I'm using rails_admin, and since it is in (very) active development, bugs turn up every now and then.
据我所知,对于 github 中的 gem,gem 没有版本,所以我不能在 Gemfile 中使用 :version
键来声明 gem.
There are no versions for the gem as far as I can tell, for the gem in github, so I can't use the :version
key for the gem declaration in the Gemfile .
有没有办法我可以将特定的提交(我知道对我工作正常)绑定"到 Gemfile?
Is there a way I can "tie" a specific commit(that I know is working fine for me) to the Gemfile ?
我目前在我的 Gemfile 中有:
I currently have in my Gemfile:
gem 'rails_admin',
:git => 'git://github.com/sferik/rails_admin.git'
我希望能够做这样的事情(例如commit_id"):
I'd like to be able to do something like this (example "commit_id"):
gem 'rails_admin',
:git => 'git://github.com/sferik/rails_admin.git',
:commit_id => "4e7d53e3c5c4c3c5c43c3"
这可能与github有关吗?
Is this possible to do with github?
推荐答案
这些都应该有效:
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'
这篇关于如何获得特定的“提交"?来自 github 的宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!