I had created several test users in my rails app to test the login. They were automatically logged in by setting a session.
Once I was satisfied with the user login, I went into the rails console and deleted the users with
User.last.delete
However, now when I try to load localhost:3000, my browser is still looking for user number 14, whom I just deleted.
ActiveRecord::RecordNotFound in StaticPagesController#home
Couldn't find User with id=14
app/controllers/application_controller.rb:7:in `current_user'
app/views/static_pages/home.html.erb:2:in `_app_views_static_pages_home_html_erb___2558135612319095530_70269927858560'
Request
Parameters:
None
Even restarting the server and completely clearing the database with in rake db:resetdidn’t help—shouldn’t this destroy whatever session problem is telling my app look for id=14?
Clear your cookies, that’s what is causing the problem.