Devise + Forem: undefined method weeks on Fixnum

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

... 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 ''

# Forem requirements:
gem 'rails', :git => "git://"
gem 'sprockets', :git => "git://"
gem 'forem', :git => "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: