plataformatec/devise — Issue #1636: User.new takes an eternity
Author: andrejj
Created: 2012-02-10 15:04:55+00:00
State: open

rails console

User.new( { :email => 'somemail@test.net', :password => 'pass',:password_confirmation => 'pass'} )

Hangs for 60s then return user new User object.

devise 2.0.1
rails 3.2

user.rb

class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :confirmable, :recoverable, :stretches => 20
end

schema.rb

create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.string "unconfirmed_email"
t.string "authentication_token"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end