Devise + Forem: undefined method weeks on Fixnum

I'm getting the following message when trying to start Webrick or console.

... devise-1.0.11/lib/devise.rb:89:in '<module:Devise>': undefined method 'weeks' for 2:Fixnum (NoMethodError)

After trying to upgrade my app to Rails 3.1 (edge) so that I may use the Forem engine.

I'm under the impression this error is occurring because Rails' support methods haven't been loaded by the time Devise is calling out to them, but I don't know why this would be the case.

My Gemfile looks like:

source 'http://rubygems.org'

# Forem requirements: gem 'rails', :git => "git://github.com/rails/rails.git" gem 'sprockets', :git => "git://github.com/sstephenson/sprockets" gem 'forem', :git => "git://github.com/radar/forem.git"

# gem 'rails', '3.0.9' gem 'devise' ...

I was using Rails 3.0.9 previously and it worked fine with Devise. However, specifying the edge version of Rails seems to be yielding this issue. Any ideas?

It's this one: https://github.com/plataformatec/devise/issues/1284

Marvin