I have an app which runs locally in production but ends up in an
infinite redirect loop on heroku.

It's using rails3 beta and authlogic (as a plugin, following the
"works with rails3 as plugin" comments on 
http://www.railsplugins.org/plugins/56-authlogic
).  I've found earlier problem reports and I've checked that my db is
all there and I've done "heroku restart".  And the same code-and-db is
working locally in production.

In my local logs, trying to go to the app redirects to /login, which
goes to UserSessionsController#new and displays the login page:

Started GET "/login" for 127.0.0.1 at 2010-03-19 18:57:06
Processing by UserSessionsController#new as HTML
UserSessionsController#new, @user_session=#<UserSession: no
credentials provided>
Rendered user_sessions/new.html.haml within layouts/
application.html.haml (3.5ms)
Completed in 6ms (Views: 3.9ms | ActiveRecord: 0.0ms) with 200


In the heroku logs, it redirects to /login, and gets to
UserSessionsController#new and builds a @user_session object, but then
instead of rendering the page, it redirects back to root, which
redirects back to /login, and loops until it triggers a
TOO_MANY_REDIRECTS error:

Started GET "/login" for 99.233.77.195 at 2010-03-20 05:38:19
  Processing by UserSessionsController#new as HTML
UserSessionsController#new, @user_session=#<UserSession: no
credentials provided>
Redirected to "/"

Started GET "/" for 99.233.77.195 at 2010-03-20 05:38:19
  Processing by HomeController#index as HTML
Redirected to "/login"
Completed in 1ms with 302

Started GET "/login" for 99.233.77.195 at 2010-03-20 05:38:20
  Processing by UserSessionsController#new as HTML
UserSessionsController#new, @user_session=#<UserSession: no
credentials provided>


It's a standard authlogic implementation, there's no extra code in
#new, nor are there added filters.  And locally on production it
renders the login page instead of redirecting to root. I put in a
support ticket yesterday, but does this ring a bell with anyone else?
I've tried it on both bamboo stacks, and I'm perplexed.

Thanks,
Sean.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to