All right, after a full day of troubleshooting, I’ll restate my problem:
On my dev machine, my application works perfectly with the
On the production box, where prior builds of my app worked before
installing the engines, I am stuck at the login page. I stop Apache,
kill my fcgis, delete the session files in /tmp, restart apache, and
it’s the same thing. Login page.
I have dropped all the engine-related tables three or four times now,
re-run rake engine_migrate and boostrap each time, and the tables all
look correct. There is an admin user with the email address I specified
in environment.rb. The roles and permissions and the join tables all
look properly populated.
I have given up for now on setting my before_action on a
per-controller basis even though it worked berfectly on the dev box. I
got rid of all of those directives and the mixins in
RAILS_ROOT/app/controllers and instead put the single :authorize_action
after the engine includes in application.rb.
I have checked, double-checked and triple-checked the includes in
application.rb and application_helper.rb.
After all this, my dev machine works exactly as expected: all actions
require a user to be logged in and if it’s not the admin, they need
assigned permissions. All of this works, including the admin user’s
ability to work with roles and user permissions.
On the production machine, I simply attempt to access /user/list… which
correctly redirects me to /user/login… and I’m stuck. I cannot log in.
Clicking the signup or forgot-password links crap out with the familiar
NoMethodError in User#forgot_password
where line #4 raised:
undefined method `errors’ for nil:NilClass
Extracted source (around line #4):
4: <%= error_messages_for ‘user’ %>
Enter your email address in the field below and click ‘Reset
Password’ to have instructions on how to retrieve your forgotten
password emailed to you.