SOLVED!

Still don't know why it was working all along on one environment and not 
the other, but I got completely rid of my overloading user_ and role_ 
controllers and now it seems to be working. So instead of applying 
before_filters on an as-needed basis, I'm going to apply it globally in 
application.rb and disable it--or grant guest privs, I suppose--as 
necessary.

Ugh.

Steve Koppelman wrote:
> All right, after a full day of troubleshooting, I'll restate my problem:
> 
> 1. On my dev machine, my application works perfectly with the 
> LoginEngine/UserEngine combo.
> 
> 2. 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.
> 
> 3. 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.
> 
> 4. 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.
> 
> 5. 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 
> nil-user error:
> 
> NoMethodError in User#forgot_password
> 
> Showing vendor/plugins/login_engine/app/views/user/forgot_password.rhtml 
> where line #4 raised:
> 
> undefined method `errors' for nil:NilClass
> 
> Extracted source (around line #4):
> 
> 1: <div title="<%= title_helper %>" class="form">
> 2:   <h3>Forgotten Password</h3>
> 3:
> 4:   <%= error_messages_for 'user' %>
> 5:
> 6:   <div class="form-padding">
> 7:     <p>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.</p>
> 
> Now what?


-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to