开发者社区> 问答> 正文

devise 相关问题

我用devise做用户注册及登录当我点击登录时候出现下面错 NameError in Devise::SessionsController#create 网上找了下 有帖说要修改“可以通过修改 /config/initializers/cookie_verification_secret.rb中的secret key来修正” 但我在/config/initializers/找不到cookie_verification_secret.rb文件 我用的rails是3.1.3 在线求助

展开
收起
心有灵_夕 2019-12-29 00:41:28 919 0
1 条回答
写回答
取消 提交回答
  • undefined local variable or method `root_path' for #<Devise::SessionsController:0x00000004574fc8>
    Rails.root: /home/gsm/rails-work/devisedemo
    
    Application Trace | Framework Trace | Full Trace
    Request
    
    Parameters:
    
    {"utf8"=>"✓",
     "authenticity_token"=>"X0kgzO8B2+AEMsffoKLcdTstYOaPDBvWmTAFGQXfRPQ=",
     "user"=>{"email"=>"gsm1022@163.com",
     "password"=>"[FILTERED]",
     "remember_me"=>"0"},
     "commit"=>"Sign in"}
    Show session dump
    
    _csrf_token: "X0kgzO8B2+AEMsffoKLcdTstYOaPDBvWmTAFGQXfRPQ="
    flash: #<ActionDispatch::Flash::FlashHash:0x00000004cd1320 @used=#<Set: {}>, @closed=false, @flashes={:notice=>"Signed in successfully."}, @now=nil>
    session_id: "f85426884953ea3639bcaa4d9ed10acb"
    warden.user.user.key: ["User", [1], "$2a$10$.tmwyk7zABbzjP.sDA./6O"]
    Show env dump
    
    GATEWAY_INTERFACE: "CGI/1.1"
    HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
    HTTP_ACCEPT_CHARSET: "GBK,utf-8;q=0.7,*;q=0.3"
    HTTP_ACCEPT_ENCODING: "gzip,deflate,sdch"
    HTTP_ACCEPT_LANGUAGE: "zh-CN,zh;q=0.8"
    HTTP_CACHE_CONTROL: "max-age=0"
    REMOTE_ADDR: "127.0.0.1"
    REMOTE_HOST: "localhost"
    SERVER_NAME: "localhost"
    SERVER_PROTOCOL: "HTTP/1.1"
    
    2019-12-29 00:41:42
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载