2012-10-18 1 views
2

내 로컬 호스트에서 맞춤 작성 양식이 효과적입니다! 아무 문제도 없습니다 - 다른 페이지의 사용자 정의 양식에서 로그인하면 사용자를 기록하고 예상대로 홈페이지로 리디렉션합니다.Heroku에서 로그인 및 등록 사용자 정의 양식 작동하지 않음

는 그러나, 나는에게 Heroku에 배포 할 때, 응용 프로그램은 행동하는 중지 - 사용자 지정 양식이 그들을 로그인하지 않고 실제 로그인 페이지로 사용자를 지시

이 내 Heroku가 로그에 출력됩니다 :

2012-10-18T09:08:08+00:00 app[web.1]: Started POST "/user/sign_in" for 116.15.222.245 at 2012-10-18 09:08:08 +0000 
2012-10-18T09:08:08+00:00 app[web.1]: cache: [POST /user/sign_in] invalidate, pass 
2012-10-18T09:08:08+00:00 app[web.1]: Processing by UserSessionsController#create as HTML 
2012-10-18T09:08:08+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"4WDTRkX842UVz7nFuGbWbA3z47+rraKXQgl3PRYuWJY=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Log In"} 
2012-10-18T09:08:08+00:00 app[web.1]: Redirected to https://example.com/user/sign_in 
2012-10-18T09:08:08+00:00 app[web.1]: Completed 302 Found in 11ms 
2012-10-18T09:08:08+00:00 heroku[router]: POST example.com/user/sign_in dyno=web.1 queue=0 wait=0ms service=16ms status=302 bytes=101 
2012-10-18T09:08:08+00:00 heroku[nginx]: 108.162.225.233 - - [18/Oct/2012:09:08:08 +0000] "POST /user/sign_in HTTP/1.1" 302 101 "http://example.com/referral_login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20100101 Firefox/15.0.1" example.com 
2012-10-18T09:08:10+00:00 app[web.1]: 
2012-10-18T09:08:10+00:00 app[web.1]: Started GET "/user/sign_in" for 116.15.222.245 at 2012-10-18 09:08:10 +0000 
2012-10-18T09:08:10+00:00 app[web.1]: 
2012-10-18T09:08:10+00:00 heroku[router]: GET example.com/user/sign_in dyno=web.1 queue=0 wait=0ms service=16ms status=200 bytes=7835 
2012-10-18T09:08:10+00:00 app[web.1]: cache: [GET /user/sign_in] miss 
2012-10-18T09:08:10+00:00 app[web.1]: Processing by UserSessionsController#new as HTML 
2012-10-18T09:08:10+00:00 app[web.1]: Rendered shared/_error_messages.html.erb (0.1ms) 
2012-10-18T09:08:10+00:00 app[web.1]: Rendered shared/_login.html.erb (2.3ms) 
2012-10-18T09:08:10+00:00 app[web.1]: Rendered user_sessions/new.html.erb within layouts/spree_application (3.0ms) 
2012-10-18T09:08:10+00:00 app[web.1]: Rendered shared/_head.html.erb (1.0ms) 
2012-10-18T09:08:10+00:00 app[web.1]: Rendered shared/_store_menu.html.erb (0.7ms) 
2012-10-18T09:08:10+00:00 app[web.1]: Rendered shared/_top_menu_bar.html.erb (0.5ms) 
2012-10-18T09:08:10+00:00 heroku[nginx]: 108.162.225.233 - - [18/Oct/2012:09:08:10 +0000] "GET /user/sign_in HTTP/1.1" 200 3412 "http://example.com/referral_login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20100101 Firefox/15.0.1" example.com 
.

Started POST "/user/sign_in" for 127.0.0.1 at 2012-10-18 17:21:36 +0800 
    Processing by UserSessionsController#create as HTML 
    Parameters: {"utf8"=>"✓", "authenticity_token"=>"m38Y47hk4UyGYAMnd76y5Qo2nK1Nv//v7s2+XdNHCbU=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Log In"} 
    User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = '[email protected]' LIMIT 1 
    (23.6ms) SELECT COUNT(DISTINCT "users"."id") FROM "users" LEFT OUTER JOIN "roles_users" ON "roles_users"."user_id" = "users"."id" LEFT OUTER JOIN "roles" ON "roles"."id" = "roles_users"."role_id" WHERE "roles"."name" = 'admin' 
    (0.5ms) UPDATE "users" SET "last_sign_in_at" = '2012-10-18 05:56:54.897695', "current_sign_in_at" = '2012-10-18 09:21:39.033308', "sign_in_count" = 75, "updated_at" = '2012-10-18 09:21:39.081684' WHERE "users"."id" = 1 
Redirected to http://localhost:3000/ 
Completed 302 Found in 227ms 

Started GET "/" for 127.0.0.1 at 2012-10-18 17:21:39 +0800 
    Processing by LandingController#index as HTML 
    User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 
Rendered landing/index.html.erb within layouts/spree_application (1.7ms) 
Rendered shared/_head.html.erb (2.0ms) 
Rendered shared/_store_menu.html.erb (2.6ms) 
Rendered shared/_top_menu_bar.html.erb (1.7ms) 
    Tracker Load (0.3ms) SELECT "trackers".* FROM "trackers" WHERE "trackers"."active" = 't' AND "trackers"."environment" = 'development' LIMIT 1 
Rendered shared/_google_analytics.html.erb (14.1ms) 
Completed 200 OK in 183ms (Views: 148.1ms | ActiveRecord: 1.9ms) 

사람의 도움이 해결에 대한 이동이있을 이유와 방법으로 되거 할 수 :

이 내 로컬 호스트에 내 출력? 나는 Devise wiki를보고, 많은 Google 검색을 수행했으며 성공하지 못한 채 몇 가지 시도를했습니다. 어떤 도움을 주셔서 감사합니다!

답변

0

기본적으로 Spree는 프로덕션 환경에서 SSL을 요구하므로 POST 요청이 https가 아닌 경우 로그인 페이지로 리디렉션됩니다.