我正在使用devise
并且active_admin
每当我访问 localhost:3000/admin 并选择Users
或Admin Users
选项卡时,rails 崩溃并带有很长的跟踪:
... ... ...
b77ae000-b77af000 r-xp 00000000 00:00 0 [vdso]
b77af000-b77ca000 r-xp 00000000 08:01 374939 /lib/ld-2.11.3.so
b77ca000-b77cb000 r--p 0001b000 08:01 374939 /lib/ld-2.11.3.so
b77cb000-b77cc000 rw-p 0001c000 08:01 374939 /lib/ld-2.11.3.so
bfd8b000-bfda0000 rw-p 00000000 00:00 0 [stack]
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Aborted
以下是routes.rb
和的内容app/admin/users.rb
。
# config/routes.rb
... ... ...
ActiveAdmin.routes(self)
devise_for :admin_users, ActiveAdmin::Devise.config
devise_for :users
...
# app/admin/users.rb
ActiveAdmin.register User do
end
# app/models/user.rb
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable, :lockable, :timeoutable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible :name, :email, :password, :password_confirmation, :remember_me
end
红宝石版本:ruby 1.9.3p362 (2012-12-25 revision 38607) [i686-linux]
谢谢你的帮助。