Skip to content

Creating user accounts from the console

Glen Horton edited this page Jan 31, 2019 · 1 revision

The following is a procedure for creating user accounts from the console.

  1. bundle exec rails console or bundle exec rails console production

  2. Adjust the variables below and paste them into the console:

     email = '[email protected]'
     password = 'pass1234'
     first_name = 'John'
     last_name = 'Doe'
    
  3. Copy and paste the code block below into the console:

     user = User.create email: email, first_name: first_name, last_name: last_name, password: password, password_confirmation: password
     user.save
    

exit

Test the new user's login and then put the credentials in a https://privnote.com and email them the link.