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