前两天在坛子里发帖Devise2 与 Devise3 有啥区别?。今天又看了看,感觉是自己没有表达清楚。现在,重新组织一下语言,重提一下问题。
目前在玩 Rabel,将 Devise 从2.2.4
升级到3.2.3
后, 登录正常工作,但是注册却提示“用户名、邮箱、密码不能为空字符串”。但是,这几个字段肯定填写啊,日志如下:
Started POST "/users" for 10.0.2.2 at 2014-03-02 09:19:52 +0000
Processing by RegistrationsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"6hMutE4ecDITHkS/hHANxDS4/F25w8s94bjetyUVOcI=", "user"=>{"nickname"=>"tttt", "email"=>"[email protected]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"注册"}
(1.1ms) BEGIN
User Exists (0.5ms) SELECT 1 AS one FROM `users` WHERE `users`.`nickname` IS NULL LIMIT 1
(0.3ms) ROLLBACK
Rendered devise/registrations/_form.html.haml (5.8ms)
Rendered devise/registrations/new.html.haml within layouts/app (8.9ms)
Rendered shared/_alert.html.haml (0.3ms)
Rendered shared/_sidebar_box.html.haml (1.8ms)
(0.4ms) SELECT COUNT(*) FROM `advertisements` WHERE (start_date <= '2014-03-02' AND expire_date >= '2014-03-02')
请问:在Rails 3.2.17
的项目中,如何将Devise
从2.2.4
升级到3.2.3
?
附录:运行环境
更多 Gem 相关信息,请看原来的帖子:Devise2 与 Devise3 有啥区别?。另外,我还试了一下, 仅仅将 Devise 从 2.2.4 升级到 3.2.3 就会引起这个问题。