title: Rails-devise: Generating encrypted_password values (for test users)
body: <p>To test my Rails/Devise application, I want to create 100 users and log in as them.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>INSERT INTO users (id,email,encrypted_password)
    VALUES (11,"test1@example.com",
      "$2a$10$VQJ9lT78.e1dtyAnkng1/ey9euL6hK/kUNQMDv8VJMAovXpuVNDZG");
  </code></pre>
  
  <p>For the <code>encrypted_password</code>, I just copied the value from another user whose password is <code>testtest</code></p>
  
  <p>PROBLEM: I can't log as <code>test1@example.com</code> with password <code>testtest</code></p>
  
  <p>I suspect <code>encrypted_password</code> has salt and I need a tool to generate it. <code>config.encryptor</code> is <code>bcrypt</code>. 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.</p>
  
  <p>How to quickly create the 100 salted passwords?<br>
  Something faster than signing up 100 times.</p>