You can clone with
# Prevent Devise from loading the User model super early with it's route hacks for Rails 3.1 rc4
# see also: https://github.com/timcharper/spork/wiki/Spork.trap_method-Jujutsu
# rest of your prefork here...
The new line is the RoutesReloader one (line 6) -- apparently Rails 3.1 added that.
The current "see also" link is: https://github.com/sporkrb/spork/wiki/Spork.trap_method-Jujitsu
Too bad it didn't work for me on rails 3.2.8 with devise 2.1.2.
The above fix works for me on rails 3.2.13 with spork 1.0.0rc3 and devise 2.2.4. But it's essential that these lines are the first ones in the prefork block
require File.expand_path("../../config/environment", __FILE__)
Thanks, @robbytobby! That worked nicely for me.
works with Rails 4 as well