colsonc1 / Proj19_Auth

0 stars 0 forks source link

Review notes #1

Open chrisvfritz opened 9 years ago

chrisvfritz commented 9 years ago

It looks like my login information isn't working on Heroku. Did you forget to add the user to Heroku's database?

colsonc1 commented 9 years ago

I merged the database.

colsonc1 commented 9 years ago

rake db:migrate right?

chrisvfritz commented 9 years ago

To add a user to our local database, we actually went into the rails console and added the user from there. To add a user to Heroku's database, we'll do something very similar to what we did with rake db:migrate. To run that on Heroku, we used the command heroku run rake db:migrate. Similarly, to run the rails console on Heroku, we can run heroku run rails console.

colsonc1 commented 9 years ago

Didn't realize this issue was still open, DONE!

colsonc1 commented 9 years ago

How do I look up what users have been entered into my database? I'm not sure if I entered everything correctly.

colsonc1 commented 9 years ago

I found "rails console > User.all" to be the solution to my question but I'm still not sure why my login info is not working. Any way you could explain whats going on?

chrisvfritz commented 9 years ago

Ahh, I see the login you're talking about now. Heroku has a separate database with a separate rails console. So to directly affect Heroku's database, you'll run heroku run rails console and then you'll be able to run things like User.all and User.create(email: 'name@example.com', password: '12345'). Let me know if that helps!

colsonc1 commented 9 years ago

Got It! Thanks!