简体   繁体   English

在Devise上注册时堆栈级别太深

[英]Stack level too deep while registering on Devise

I am currently getting an error while registering with devise. 我正在使用设计注册时遇到错误。 When I press submit on the sign up form, I am redirected to /users with this error: 当我在注册表单上按提交时,我被重定向到/ users并出现此错误:

SystemStackError in Devise::RegistrationsController#create stack level too deep Devise中的SystemStackError :: RegistrationsController#创建堆栈级别太深

Rails.root: /Users/user/Desktop/Programming/Rails/Site Rails.root:/ Users / user / Desktop / Programming / Rails / Site

Request 请求

Parameters: 参数:

{"utf8"=>"✓",
 "authenticity_token"=>"VTOUFUYrYxUD0sJpdCz5Mpn6Dvyf7CVqUjj5oDSIqf8=",
 "user"=>{"email"=>"example@gmail.com",
 "password"=>"[FILTERED]",
 "password_confirmation"=>"[FILTERED]"},
 "commit"=>"Sign up"}

I have read other people having similar problems, but none of their solutions have worked. 我读过其他有类似问题的人,但他们的解决方案都没有奏效。 Here is what I had tried: Running a migration, and checking for infinite recursion in routes.rb 这是我尝试过的:运行迁移,并检查routes.rb中的无限递归

Gems: 宝石:

gem 'pg'

gem 'forem', :github => "radar/forem", :branch => "rails4"
gem 'forem-bootstrap', :github => "radar/forem-bootstrap", :branch => "master"

gem 'devise', '3.0.0'
gem 'kaminari'
gem 'friendly_id', github: "FriendlyId/friendly_id"
gem 'cancan'

gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails"


gem 'twitter-bootstrap-rails'

gem 'rails_12factor', group: :production

This error generally happens when you accidentally recursively changing an attribute. 当您意外递归更改属性时,通常会发生此错误。 If you have a xyz attribute in User model, and a virtual attribute named xyz, that is directly changing the xyz, you end up calling the virtual, the virtual calls the virtual again and so on.. Therefore, take a look on whether something like that happens somewhere in your code. 如果你在用户模型中有xyz属性,并且有一个名为xyz的虚拟属性,即直接更改xyz,你最终调用虚拟,虚拟再次调用虚拟等等。因此,看看是否有什么东西就像在你的代码中某处发生的那样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM