Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6706441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:31:15+00:00 2026-05-26T07:31:15+00:00

I have having a problem saving the sign up form using Devise. I am

  • 0

I have having a problem saving the sign up form using Devise. I am using rails 3.1.1, ruby 1.9.2 and devise 1.4.8. Also, I am using mongoid 2.3.2.

user.rb

class User
include Mongoid::Document
# Include default devise modules. Others available are:
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable

#fields in addition to Devise fields.
field :name
field :display_name
    index :display_name, :unique=>true
field :gender
field :website
field :about

#referenced documents
has_many :accomplishments
has_many :projects
has_many :ranks

#self reference for followers and followees
references_and_referenced_in_many :followees, :class_name=>"User", :inverse_of=>:followers
references_and_referenced_in_many :followers, :class_name=>"User", :inverse_of=>:followees

#validations
validates_uniqueness_of :display_name, :message=>"Display name already exists.", :allow_nil=>true
validates_presence_of :name, :message=>" is required"

attr_accessible :email, :password, :password_confirmation, :name
end

And my signup form is pretty straight forward as well.

/views/devise/registrations/new.html.erd

<h2>Sign up</h2>

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
  <%= devise_error_messages! %>
    <p>
        <%= f.label :email %>
        <div class="input">
            <%= f.email_field :email %>
        </div>
    </p>
    <p>
        <%= f.label :password %>
        <div class="input">
            <%= f.password_field :password %>
        </div>
    </p>
    <p>
        <%= f.label :confirmation %>
        <div class="input">
            <%= f.password_field :password_confirmation %>
        </div>
    </p>
    <p>
        <%= f.label :name %>
        <div class="input">
            <%= f.text_field :name %>
        </div>
    </p>
    <br/>
  <p><%= f.submit "Sign up", :class => "btn primary"  %></p>
<% end %>

<%= render :partial => "devise/shared/links" %>

My problem is that when I submit, I get no errors and the flash tells me I successfully signed up. But when you take a look in the users collection in mongo, no documents exist. I have tried making my users model pretty bare bones and modified the sign up page accordingly and still end up with the same result. I am running out of ideas on what to look for to determine why the record is not saving. Any thoughts on what could be going wrong?

Also if more details are needed or a better explanation of the problem, I am more than happy to dive further. Hitting a brick wall on what to check next to resolve the problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:31:16+00:00Added an answer on May 26, 2026 at 7:31 am

    Found the problem. Apparently some documents within my users collection were conflicting with the validation of the email address I was trying to submit. The document within the collection was manually entered, but did not contain the same email address that I was trying to sign a new user up for. I suppose letting devise handle all user creation would be a good rule of thumb to keep this error from happening in the future.

    EDIT

    Seems to be if any document exists, wether create by devise or manually, registration seems to fail.

    EDIT AGAIN

    The problem is that indexes were set in previous development that were not matched with what was declared in the model. Since mongoid does not retract previous declarations, the index still existed and threw an exception within mongo. Why this did not throw an exception in app is beyond me. Had to use db.system.profile.find() to watch the log.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im having a problem with python.. I have a binary tree node type: class
My problem is that I have a user that is having a problem displaying
am having problem in Saving some data in my Java code. I have like
Okay, I'm having a problem saving after I've deleted all the objects I have
I have been having the following problem, i think it's probably due to the
I have a flash file menu i am having problem while link it to
We are having problem with the server migration. We have one application that are
I'm having problem when running my Windows Forms program. In the program, I have
I have an old C++ project and I'm having problem building it. For a
Im having a problem with the HeaderText not being translated when i have definied

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.