<p>I'm using the RESTful authentication Rails plugin for an app I'm developing.
I'm having a strange issue I can't get to the bottom of.
Essentially, the first time I log into the app after a period of inactivity (the app is deployed in production, but only being used by me), I will be brought to a 404 page, but if I go back to the home page and log in again, everything works according to plan.
Any ideas?</p>

[{'answer_id': 38915, 'author': 'Espo', 'author_id': 2257, 'author_profile': 'https://Stackoverflow.com/users/2257', 'pm_score': 3, 'selected': True, 'text': '<p>Please check your routes.</p>\n\n<p>Not all routes are created equally. Routes have priority defined by the order of appearance of the routes in the config/routes.rb file. The priority goes from top to bottom. The last route in that file is at the lowest priority and will be applied last. If no route matches, <strong>404</strong> is returned.</p>\n\n<p>More info: <a href="http://api.rubyonrails.org/classes/ActionController/Routing.html" rel="nofollow noreferrer">http://api.rubyonrails.org/classes/ActionController/Routing.html</a></p>\n'}, {'answer_id': 39510, 'author': 'PJ.', 'author_id': 3230, 'author_profile': 'https://Stackoverflow.com/users/3230', 'pm_score': 1, 'selected': False, 'text': '<p>I\'m using a slightly modified version of that plugin so I\'m not 100% sure that this will be the same for you, but for me the default is to redirect to the root path, or the page you were trying to get to if there is one.  (check your lib/authenticated_system.rb to see your default)  If you don\'t have map.root defined in your routes, I believe that would cause the error you\'re describing -- it wouldn\'t find root_path at first but if you tried "from" a page in your app it would redirect to that page.</p>\n\n<p>Let us know what happens with this one if you would, I\'m curious to see what this ends up being in case I run into it in the future.  :)</p>\n'}]
['https://Stackoverflow.com/questions/38901', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2293/']