9

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>'
lucapette
  • 20,564
  • 6
  • 65
  • 59
Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196

2 Answers2

14

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

gem 'rails', :git => 'git://github.com/rails/rails.git', :ref => '55cc16f'
Gavin Anderegg
  • 6,281
  • 2
  • 25
  • 35
0

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'

iltempo
  • 15,718
  • 8
  • 61
  • 72
  • Using the :ref option is properly better but :branch works as well. Git is treating it the same. – iltempo Feb 19 '12 at 19:20