Tyler DeWitt
Tyler DeWitt

Reputation: 23576

Use non released Rails version from Git (possibly by commit number)

I'm trying to use Passenger to host my rails app, but as noted in this issue, logging is s little whacky in rails 3.2.1. Someone has released a commit (that has been pulled into the main branch) with a fix. How can I tell my app to use the main branch instead of a specific version of the rails gem? Also, is there a way I can specify that commit, in case the change is later overwritten by another pull?

Something like (in my Gemfile):

gem 'rails', git => 'git://github.com/rails/rails.git:<commit hash>'

Upvotes: 9

Views: 1404

Answers (2)

Gavin Anderegg
Gavin Anderegg

Reputation: 6391

The Bundler docs note that you can use a specific reference like so:

gem 'rails', :git => 'git://github.com/rails/rails.git', :ref => '55cc16f'

Upvotes: 14

iltempo
iltempo

Reputation: 16012

You should be able to specify a certain commit hash via the branch option:

gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => 'c67ff97ec3895db99bdb6b7cb3e8cc4e3cee0949'

Upvotes: 0

Related Questions