Devise 从 1.1.5 升级到 1.4.5 导致错误数量错误
我刚刚从 Devise 1.1.5 升级到 1.4.5 以与 Rails 3.1 一起使用(1.1.5 似乎会导致 bcrypt gem 版本问题)。
现在用户已登录?抛出“参数数量错误(1 为 2)”
Stack trace is:
devise (1.4.5) lib/devise/models/authenticatable.rb:89:in `serialize_from_session'
devise (1.4.5) lib/devise/rails/warden_compat.rb:27:in `deserialize'
warden (1.0.5) lib/warden/session_serializer.rb:31:in `fetch'
warden (1.0.5) lib/warden/proxy.rb:182:in `user'
warden (1.0.5) lib/warden/proxy.rb:278:in `_perform_authentication'
warden (1.0.5) lib/warden/proxy.rb:90:in `authenticate'
devise (1.4.5) lib/devise/controllers/helpers.rb:48:in `current_user'
devise (1.4.5) lib/devise/controllers/helpers.rb:44:in `user_signed_in?'
app/controllers/main_controller.rb:24:in `index'
actionpack (3.1.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.1.0) lib/abstract_controller/base.rb:167:in `process_action'
.....
有人遇到过这种情况吗?
I just upgraded from Devise 1.1.5 to 1.4.5 to use with Rails 3.1 (1.1.5 seems to cause a bcrypt gem version problem).
Now user_signed_in? throws " wrong number of arguments (1 for 2)"
Stack trace is:
devise (1.4.5) lib/devise/models/authenticatable.rb:89:in `serialize_from_session'
devise (1.4.5) lib/devise/rails/warden_compat.rb:27:in `deserialize'
warden (1.0.5) lib/warden/session_serializer.rb:31:in `fetch'
warden (1.0.5) lib/warden/proxy.rb:182:in `user'
warden (1.0.5) lib/warden/proxy.rb:278:in `_perform_authentication'
warden (1.0.5) lib/warden/proxy.rb:90:in `authenticate'
devise (1.4.5) lib/devise/controllers/helpers.rb:48:in `current_user'
devise (1.4.5) lib/devise/controllers/helpers.rb:44:in `user_signed_in?'
app/controllers/main_controller.rb:24:in `index'
actionpack (3.1.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.1.0) lib/abstract_controller/base.rb:167:in `process_action'
.....
Anyone experiencing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我运行了 rake tmp:clear 并在 session_store.rb 中更改了会话名称
Woodhack::Application.config.session_store :cookie_store, :key => “_NEW_NAME_HERE_session”
I ran
rake tmp:clear
and changed the name of my session insession_store.rb
Woodhack::Application.config.session_store :cookie_store, :key => '_NEW_NAME_HERE_session'
您还可以更改 config/initializers/secret_token.rb 中的一个字符
You can also change one character in your config/initializers/secret_token.rb