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

  • Home
  • SEARCH
  • 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 6585555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:40:42+00:00 2026-05-25T16:40:42+00:00

To test my Rails/Devise application, I want to create 100 users and log in

  • 0

To test my Rails/Devise application, I want to create 100 users and log in as them.

I tried the following:

INSERT INTO users (id,email,encrypted_password)
  VALUES (11,"test1@example.com",
    "$2a$10$VQJ9lT78.e1dtyAnkng1/ey9euL6hK/kUNQMDv8VJMAovXpuVNDZG");

For the encrypted_password, I just copied the value from another user whose password is testtest

PROBLEM: I can’t log as test1@example.com with password testtest

I suspect encrypted_password has salt and I need a tool to generate it. config.encryptor is bcrypt. I installed bcrypt (Linux) but the man page is very short and only explains how to encrypt files, so I guess it is not the most convenient tool to salt passwords.

How to quickly create the 100 salted passwords?
Something faster than signing up 100 times.

  • 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-25T16:40:42+00:00Added an answer on May 25, 2026 at 4:40 pm

    Making u = User.create(:email => 'youruser@mail.com', :password => 'testtest', :password_confirmation => 'testtest') and then u.confirm! (if you are using the confirmable module) from your tests should generate the encrypted_password for the user correctly.

    Anyway you should considerate using fixtures or blueprints for your tests.

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

Sidebar

Related Questions

Following the README documentation, I installed Devise into an existing Rails 3 application. However,
Application-Stack: Rails3, CanCan, Devise, Shoulda I've got some nested Resources and want to test
I'm using cucumber to test my rails 3.1 application and i'm using devise for
I want to test the REST api on my Rails site. What is the
I'm new to rails and cucumber and I'm trying to test the following scenario
I installed devise successfully: @ubuntu:~/boltzman$ rails generate devise User invoke active_record create db/migrate/20111109080820_devise_create_users.rb create
I'm using rails 3.1 with Devise. When an account confirmation email goes out, it
We've got a Rails application just upgraded to Rails3 using Devise's Rails3 gem for
I want to test my rails web service using cURL, yet so far I
I'm using rails_admin and devise in my rails 3 application and writing tests for

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.