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 8271137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:46:08+00:00 2026-06-08T06:46:08+00:00

I’m having trouble seeding my users table. (rails 3.2.6, jruby 1.6.7.2, devise 2.1.2) It’s

  • 0

I’m having trouble seeding my users table.

(rails 3.2.6, jruby 1.6.7.2, devise 2.1.2)

It’s a pretty generic User table, generated by “rails generate devise User”, plus the modifications described by this howto page so that users can login with username instead of email address.

rails db:seed is not giving any indication of error, nor is the log. When I use sqlite console to confirm, the table is empty. Yes, it’s using development environment. I’ve double and triple-checked this.

When I use rails console and enter the creation command, I get this:

1178 ~/dev/proj$ rails console
Loading development environment (Rails 3.2.6)
jruby-1.6.7.2 :001 > User.create( 
jruby-1.6.7.2 :002 >       :username             => 'admin',
jruby-1.6.7.2 :003 >       :email                => 'admin@fake.com', 
jruby-1.6.7.2 :004 >       :password             => 'admin',
jruby-1.6.7.2 :005 >       :password_confirmation => 'admin', 
jruby-1.6.7.2 :006 >     )
    User Exists (1.0ms)  SELECT 1 AS one FROM "users" WHERE "users"."email" = 'admin@x.com' LIMIT 1
    => #<User id: nil, email: "admin@fake.com", encrypted_password: "$2a$10$SMz0xdF.BkPV.4IX4TZ6Zu9WbQEk6kvap7mSGfwA7cLe...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: nil, updated_at: nil, username: "admin"> 

I’m not sure why it says the user exists, because the table was and is still empty, as shown here:

jruby-1.6.7.2 :013 > User.all
    User Load (0.0ms)  SELECT "users".* FROM "users" 
=> [] 

It could be that a validation function is malfunctioning. The only one I can find in my source is the find_first_by_auth_conditions one that I copied (as directed) out of the aforementioned-howto page, but that doesn’t look to me like it could be causing this.

I’d appreciate any help. What’s preventing me from creating this user?

Update: If I use the following, it works:

u = User.new(...)
u.save(:validate=>false) 

So this means that my validation is failing somewhere. Unfortunately, I haven’t coded any validation aside from the one method I mentioned earlier. How do I resolve that?

  • 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-06-08T06:46:09+00:00Added an answer on June 8, 2026 at 6:46 am

    Ugh. It turns out that this user’s password was too short.

    Looks like the “User Exists” message is actually quite misleading. It gives you the same thing if you create a user where password != confirmation.

    Created an issue on the devise project to see if this can be improved.
    https://github.com/plataformatec/devise/issues/1985

    Edit: And that issue was answered, and I see that I just didn’t know how to read the error messages.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have two tables with like below codes: Table: Accounts id | username |
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and

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.