< Return to Blog

Upgrading to Rails 3.2 and [Monkeypatching] Omniauth Issue with Rack (Bad Version)

Update

This has been fixed, simply grab the HEAD of rack till the version gets updated.

commit d544b567d945d9899965128f11df84fd5c55ab21
Author: Michael de Silva <[email protected]>
Date:   Sun Jan 22 09:56:06 2012 +0300

    fetching rack head as bad version fix has been merged

diff --git a/Gemfile b/Gemfile
index 2e758ac..0da651b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -28,7 +28,7 @@ gem 'redcarpet', '~> 2.0.0'
 gem 'albino'
 gem 'nokogiri'

-gem "rack", git: "https://github.com/rack/rack.git", ref: "e20baec005238f987628+gem "rack", git: "https://github.com/rack/rack.git"
 gem 'omniauth', :git => 'git://github.com/intridea/omniauth.git'
 gem 'omniauth-facebook'
 gem 'omniauth-twitter'
Original post

Just set about updating my blog to Rails 3.2 as per the release notes and ran into the following:

NoMethodError (undefined method `include?' for nil:NilClass):
  omniauth (1.0.2) lib/omniauth/builder.rb:41:in `call'

I updated Omniauth to find it wouldn't work and even pointed it to the current HEAD. Still no cheddar:

NoMethodError (undefined method `include?' for nil:NilClass):
  /Users/mdesilva/.rvm/gems/ruby-1.9.2-p290@rails32x/bundler/gems/omniauth-7840608a02a9/lib/omniauth/builder.rb:41:in `call'
  warden (1.1.0) lib/warden/manager.rb:35:in `block in call'

The issue is due to a bad patch version with Rake and one needs to add the following to the Gemfile as discussed on GH:

gem "rack", git: "https://github.com/rack/rack.git", ref: "e20baec005238f9876281c0d083fe5a4e01aa034" 

My updated Gemfile now has

gem "rack", git: "https://github.com/rack/rack.git", ref: "e20baec005238f9876281c0d083fe5a4e01aa034"
gem 'omniauth', :git => 'git://github.com/intridea/omniauth.git'
gem 'omniauth-facebook'
gem 'omniauth-twitter'

This should be fixed soon, fingers crossed.