How to get a specific “commit” of a gem from github?

前端 未结 2 2101
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-07 10:45

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 th

相关标签:
2条回答
  • 2020-12-07 11:09

    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

    0 讨论(0)
  • 2020-12-07 11:11

    A shorter version:

    gem 'rails', :github => 'rails/rails', :ref => '4aded'
    

    Or, in Ruby 1.9+

    gem 'rails', github: 'rails/rails', ref: '4aded'
    
    0 讨论(0)
提交回复
热议问题