ging / social_stream

A framework for building distributed social network websites
http://social-stream.dit.upm.es/
MIT License
1.13k stars 307 forks source link

Logout route fails to render new session #267

Closed remware closed 12 years ago

remware commented 12 years ago

Hi, I have social stream base gem 0.21.0 and when users sign out I get error ActiveRecord::RecordNotFound with dump : {"id"=>"logout"}

The devise gem is 1.5.3

The routes.rb contains devise_for :users, :path_names => { ... :sign_out = 'logout' ...}

I wonder what needs to be fixed in social stream gem or what should define in route to match social new session after logout ?

Please help!

atd commented 12 years ago

Hi @remware, could you paste the output of rake routes?

remware commented 12 years ago

By the way in stackoverflow they point to serving application.js incorrectly but not sure if that is my case. At least the sing_up is working fine.

atd commented 12 years ago

Sorry, but that is not the rake routes but config/routes.rb

remware commented 12 years ago

Faraday: you may want to install system_timer for reliable timeouts WARNING: using the built-in Timeout class which is known to have issues when used for opening connections. Install the SystemTimer gem if you want to make sure the Redis client will not hang.

Sphinx cannot be found on your system. You may need to configure the following settings in your config/sphinx.yml file:

For more information, read the documentation: http://freelancing-god.github.com/ts/en/advanced_config.html

                                 diets GET    /diets(.:format)                
                    diets#index
                                       POST   /diets(.:format)                
                    diets#create
                              new_diet GET    /diets/new(.:format)            
                    diets#new
                             edit_diet GET    /diets/:id/edit(.:format)       
                    diets#edit
                                  diet GET    /diets/:id(.:format)            
                    diets#show
                                       PUT    /diets/:id(.:format)            
                    diets#update
                                       DELETE /diets/:id(.:format)            
                    diets#destroy
                            excercises GET    /excercises(.:format)           
                    excercises#index
                                       POST   /excercises(.:format)           
                    excercises#create
                         new_excercise GET    /excercises/new(.:format)       
                    excercises#new
                        edit_excercise GET    /excercises/:id/edit(.:format)  
                    excercises#edit
                             excercise GET    /excercises/:id(.:format)       
                    excercises#show
                                       PUT    /excercises/:id(.:format)       
                    excercises#update
                                       DELETE /excercises/:id(.:format)       
                    excercises#destroy
                            vitals GET    /vitals(.:format)               
                    vitals#index
                                       POST   /vitals(.:format)               
                    vitals#create
                             new_vital GET    /vitals/new(.:format)           
                    vitals#new
                            edit_vital GET    /vitals/:id/edit(.:format)      
                    vitals#edit
                                 vital GET    /vitals/:id(.:format)           
                    vitals#show
                                       PUT    /vitals/:id(.:format)           
                    vitals#update
                                       DELETE /vitals/:id(.:format)           
                    vitals#destroy
                                 moods GET    /moods(.:format)                
                    moods#index
                                       POST   /moods(.:format)                
                    moods#create
                              new_mood GET    /moods/new(.:format)            
                    moods#new
                             edit_mood GET    /moods/:id/edit(.:format)       
                    moods#edit
                                  mood GET    /moods/:id(.:format)            
                    moods#show
                                       PUT    /moods/:id(.:format)            
                    moods#update
                                       DELETE /moods/:id(.:format)            
                    moods#destroy

download_health_record GET /health_records/:id/download(.:f ormat) health_records#download health_records GET /health_records(.:format)
health_records#index POST /health_records(.:format)
health_records#create new_health_record GET /health_records/new(.:format)
health_records#new edit_health_record GET /health_records/:id/edit(.:forma t) health_records#edit health_record GET /health_records/:id(.:format)
health_records#show PUT /health_records/:id(.:format)
health_records#update DELETE /health_records/:id(.:format)
health_records#destroy user_diets GET /users/:user_id/diets(.:format) diets#index POST /users/:user_id/diets(.:format) diets#create new_user_diet GET /users/:user_id/diets/new(.:form at) diets#new edit_user_diet GET /users/:user_id/diets/:id/edit(. :format) diets#edit user_diet GET /users/:user_id/diets/:id(.:form at) diets#show PUT /users/:user_id/diets/:id(.:form at) diets#update DELETE /users/:user_id/diets/:id(.:form at) diets#destroy user_excercises GET /users/:user_id/excercises(.:for mat) excercises#index POST /users/:user_id/excercises(.:for mat) excercises#create new_user_excercise GET /users/:user_id/excercises/new(. :format) excercises#new edit_user_excercise GET /users/:user_id/excercises/:id/e dit(.:format) excercises#edit user_excercise GET /users/:user_id/excercises/:id(. :format) excercises#show PUT /users/:user_id/excercises/:id(. :format) excercises#update DELETE /users/:user_id/excercises/:id(. :format) excercises#destroy user_vitals GET /users/:user_id/vitals(.:format) vitals#index POST /users/:user_id/vitals(.:format) vitals#create new_user_vital GET /users/:user_id/vitals/new(.:for mat) vitals#new edit_user_vital GET /users/:user_id/vitals/:id/edit( .:format) vitals#edit user_vital GET /users/:user_id/vitals/:id(.:for mat) vitals#show PUT /users/:user_id/vitals/:id(.:for mat) vitals#update DELETE /users/:user_id/vitals/:id(.:for mat) vitals#destroy user_moods GET /users/:user_id/moods(.:format) moods#index POST /users/:user_id/moods(.:format) moods#create new_user_mood GET /users/:user_id/moods/new(.:form at) moods#new edit_user_mood GET /users/:user_id/moods/:id/edit(. :format) moods#edit user_mood GET /users/:user_id/moods/:id(.:form at) moods#show PUT /users/:user_id/moods/:id(.:form at) moods#update DELETE /users/:user_id/moods/:id(.:form at) moods#destroy download_user_health_record GET /users/:user_id/health_records/: id/download(.:format) health_records#download user_health_records GET /users/:user_id/health_records(. :format) health_records#index POST /users/:user_id/health_records(. :format) health_records#create new_user_health_record GET /users/:user_id/health_records/n ew(.:format) health_records#new edit_user_health_record GET /users/:user_id/health_records/: id/edit(.:format) health_records#edit user_health_record GET /users/:user_id/health_records/: id(.:format) health_records#show PUT /users/:user_id/health_records/: id(.:format) health_records#update DELETE /users/:user_id/health_records/: id(.:format) health_records#destroy users GET /users(.:format)
users#index POST /users(.:format)
users#create new_user GET /users/new(.:format)
users#new edit_user GET /users/:id/edit(.:format)
users#edit user GET /users/:id(.:format)
users#show PUT /users/:id(.:format)
users#update DELETE /users/:id(.:format)
users#destroy group_diets GET /groups/:group_id/diets(.:format ) diets#index POST /groups/:group_id/diets(.:format ) diets#create new_group_diet GET /groups/:group_id/diets/new(.:fo rmat) diets#new edit_group_diet GET /groups/:group_id/diets/:id/edit (.:format) diets#edit group_diet GET /groups/:group_id/diets/:id(.:fo rmat) diets#show PUT /groups/:group_id/diets/:id(.:fo rmat) diets#update DELETE /groups/:group_id/diets/:id(.:fo rmat) diets#destroy group_excercises GET /groups/:group_id/excercises(.:f ormat) excercises#index POST /groups/:group_id/excercises(.:f ormat) excercises#create new_group_excercise GET /groups/:group_id/excercises/new (.:format) excercises#new edit_group_excercise GET /groups/:group_id/excercises/:id /edit(.:format) excercises#edit group_excercise GET /groups/:group_id/excercises/:id (.:format) excercises#show PUT /groups/:group_id/excercises/:id (.:format) excercises#update DELETE /groups/:group_id/excercises/:id (.:format) excercises#destroy group_vitals GET /groups/:group_id/vitals(.:forma t) vitals#index POST /groups/:group_id/vitals(.:forma t) vitals#create new_group_vital GET /groups/:group_id/vitals/new(.:f ormat) vitals#new edit_group_vital GET /groups/:group_id/vitals/:id/edi t(.:format) vitals#edit group_vital GET /groups/:group_id/vitals/:id(.:f ormat) vitals#show PUT /groups/:group_id/vitals/:id(.:f ormat) vitals#update DELETE /groups/:group_id/vitals/:id(.:f ormat) vitals#destroy group_moods GET /groups/:group_id/moods(.:format ) moods#index POST /groups/:group_id/moods(.:format ) moods#create new_group_mood GET /groups/:group_id/moods/new(.:fo rmat) moods#new edit_group_mood GET /groups/:group_id/moods/:id/edit (.:format) moods#edit group_mood GET /groups/:group_id/moods/:id(.:fo rmat) moods#show PUT /groups/:group_id/moods/:id(.:fo rmat) moods#update DELETE /groups/:group_id/moods/:id(.:fo rmat) moods#destroy download_group_health_record GET /groups/:group_id/health_records /:id/download(.:format) health_records#download group_health_records GET /groups/:group_id/health_records (.:format) health_records#index POST /groups/:group_id/health_records (.:format) health_records#create new_group_health_record GET /groups/:group_id/health_records /new(.:format) health_records#new edit_group_health_record GET /groups/:group_id/health_records /:id/edit(.:format) health_records#edit group_health_record GET /groups/:group_id/health_records /:id(.:format) health_records#show PUT /groups/:group_id/health_records /:id(.:format) health_records#update DELETE /groups/:group_id/health_records /:id(.:format) health_records#destroy groups GET /groups(.:format)
groups#index POST /groups(.:format)
groups#create new_group GET /groups/new(.:format)
groups#new edit_group GET /groups/:id/edit(.:format)
groups#edit group GET /groups/:id(.:format)
groups#show PUT /groups/:id(.:format)
groups#update DELETE /groups/:id(.:format)
groups#destroy users_health_insertHealthRecord GET /users/health/insertHealthRecord (.:format) users/health#insertHealthRecord /users/health/insertHealthRecord (.:format) users/health#insertHealthRecord users_health_insertImageDocumentsFromCouch GET /users/health/insertImageDocumen tsFromCouch(.:format) users/health#insertImageDocumentsFromCouch /users/health/insertImageDocumen tsFromCouch(.:format) users/health#insertImageDocumentsFromCouch new_user_session GET /users/login(.:format)
devise/sessions#new user_session POST /users/login(.:format)
devise/sessions#create destroy_user_session GET /users/logout(.:format)
devise/sessions#destroy user_omniauth_callback /users/auth/:action/callback(.:f ormat) omniauth_callbacks#(?-mix:linkedin|facebook) user_password POST /users/secret(.:format)
devise/passwords#create new_user_password GET /users/secret/new(.:format)
devise/passwords#new edit_user_password GET /users/secret/edit(.:format)
devise/passwords#edit PUT /users/secret(.:format)
devise/passwords#update cancel_user_registration GET /users/register/cancel(.:format) devise/registrations#cancel user_registration POST /users/register(.:format)
devise/registrations#create new_user_registration GET /users/register/sign_up(.:format ) devise/registrations#new edit_user_registration GET /users/register/edit(.:format)
devise/registrations#edit PUT /users/register(.:format)
devise/registrations#update DELETE /users/register(.:format)
devise/registrations#destroy xmpp_setConnection /xmpp/setConnection(.:format)
Xmpp#setConnection xmpp_unsetConnection /xmpp/unsetConnection(.:format) Xmpp#unsetConecction xmpp_setPresence /xmpp/setPresence(.:format)
Xmpp#setPresence xmpp_unsetPresence /xmpp/unsetPresence(.:format)
Xmpp#unsetPresence xmpp_resetConnection /xmpp/resetConnection(.:format) Xmpp#resetConnection xmpp_synchronizePresence /xmpp/synchronizePresence(.:form at) Xmpp#synchronizePresence xmpp_updateSettings /xmpp/updateSettings(.:format)
Xmpp#updateSettings chatWindow /chatWindow(.:format)
Xmpp#chatWindow requestVideoChat /requestVideoChat(.:format)
Xmpp#getOpenTokSessionIDAndToken linkser_parse /linkser_parse(.:format)
linkser#index rooms GET /rooms(.:format)
rooms#index POST /rooms(.:format)
rooms#create new_room GET /rooms/new(.:format)
rooms#new edit_room GET /rooms/:id/edit(.:format)
rooms#edit room GET /rooms/:id(.:format)
rooms#show PUT /rooms/:id(.:format)
rooms#update DELETE /rooms/:id(.:format)
rooms#destroy pictures GET /pictures(.:format)
pictures#index POST /pictures(.:format)
pictures#create new_picture GET /pictures/new(.:format)
pictures#new edit_picture GET /pictures/:id/edit(.:format)
pictures#edit picture GET /pictures/:id(.:format)
pictures#show PUT /pictures/:id(.:format)
pictures#update DELETE /pictures/:id(.:format)
pictures#destroy audios GET /audios(.:format)
audios#index POST /audios(.:format)
audios#create new_audio GET /audios/new(.:format)
audios#new edit_audio GET /audios/:id/edit(.:format)
audios#edit audio GET /audios/:id(.:format)
audios#show PUT /audios/:id(.:format)
audios#update DELETE /audios/:id(.:format)
audios#destroy videos GET /videos(.:format)
videos#index POST /videos(.:format)
videos#create new_video GET /videos/new(.:format)
videos#new edit_video GET /videos/:id/edit(.:format)
videos#edit video GET /videos/:id(.:format)
videos#show PUT /videos/:id(.:format)
videos#update DELETE /videos/:id(.:format)
videos#destroy search_documents GET /documents/search(.:format)
documents#search download_document GET /documents/:id/download(.:format ) documents#download documents GET /documents(.:format)
documents#index POST /documents(.:format)
documents#create new_document GET /documents/new(.:format)
documents#new edit_document GET /documents/:id/edit(.:format)
documents#edit document GET /documents/:id(.:format)
documents#show PUT /documents/:id(.:format)
documents#update DELETE /documents/:id(.:format)
documents#destroy user_pictures GET /users/:user_id/pictures(.:forma t) pictures#index POST /users/:user_id/pictures(.:forma t) pictures#create new_user_picture GET /users/:user_id/pictures/new(.:f ormat) pictures#new edit_user_picture GET /users/:user_id/pictures/:id/edi t(.:format) pictures#edit user_picture GET /users/:user_id/pictures/:id(.:f ormat) pictures#show PUT /users/:user_id/pictures/:id(.:f ormat) pictures#update DELETE /users/:user_id/pictures/:id(.:f ormat) pictures#destroy user_audios GET /users/:user_id/audios(.:format) audios#index POST /users/:user_id/audios(.:format) audios#create new_user_audio GET /users/:user_id/audios/new(.:for mat) audios#new edit_user_audio GET /users/:user_id/audios/:id/edit( .:format) audios#edit user_audio GET /users/:user_id/audios/:id(.:for mat) audios#show PUT /users/:user_id/audios/:id(.:for mat) audios#update DELETE /users/:user_id/audios/:id(.:for mat) audios#destroy user_videos GET /users/:user_id/videos(.:format) videos#index POST /users/:user_id/videos(.:format) videos#create new_user_video GET /users/:user_id/videos/new(.:for mat) videos#new edit_user_video GET /users/:user_id/videos/:id/edit( .:format) videos#edit user_video GET /users/:user_id/videos/:id(.:for mat) videos#show PUT /users/:user_id/videos/:id(.:for mat) videos#update DELETE /users/:user_id/videos/:id(.:for mat) videos#destroy search_user_documents GET /users/:user_id/documents/search (.:format) documents#search download_user_document GET /users/:user_id/documents/:id/do wnload(.:format) documents#download user_documents GET /users/:user_id/documents(.:form at) documents#index POST /users/:user_id/documents(.:form at) documents#create new_user_document GET /users/:user_id/documents/new(.: format) documents#new edit_user_document GET /users/:user_id/documents/:id/ed it(.:format) documents#edit user_document GET /users/:user_id/documents/:id(.: format) documents#show PUT /users/:user_id/documents/:id(.: format) documents#update DELETE /users/:user_id/documents/:id(.: format) documents#destroy GET /users(.:format)
users#index POST /users(.:format)
users#create GET /users/new(.:format)
users#new GET /users/:id/edit(.:format)
users#edit GET /users/:id(.:format)
users#show PUT /users/:id(.:format)
users#update DELETE /users/:id(.:format)
users#destroy group_pictures GET /groups/:group_id/pictures(.:for mat) pictures#index POST /groups/:group_id/pictures(.:for mat) pictures#create new_group_picture GET /groups/:group_id/pictures/new(. :format) pictures#new edit_group_picture GET /groups/:group_id/pictures/:id/e dit(.:format) pictures#edit group_picture GET /groups/:group_id/pictures/:id(. :format) pictures#show PUT /groups/:group_id/pictures/:id(. :format) pictures#update DELETE /groups/:group_id/pictures/:id(. :format) pictures#destroy group_audios GET /groups/:group_id/audios(.:forma t) audios#index POST /groups/:group_id/audios(.:forma t) audios#create new_group_audio GET /groups/:group_id/audios/new(.:f ormat) audios#new edit_group_audio GET /groups/:group_id/audios/:id/edi t(.:format) audios#edit group_audio GET /groups/:group_id/audios/:id(.:f ormat) audios#show PUT /groups/:group_id/audios/:id(.:f ormat) audios#update DELETE /groups/:group_id/audios/:id(.:f ormat) audios#destroy group_videos GET /groups/:group_id/videos(.:forma t) videos#index POST /groups/:group_id/videos(.:forma t) videos#create new_group_video GET /groups/:group_id/videos/new(.:f ormat) videos#new edit_group_video GET /groups/:group_id/videos/:id/edi t(.:format) videos#edit group_video GET /groups/:group_id/videos/:id(.:f ormat) videos#show PUT /groups/:group_id/videos/:id(.:f ormat) videos#update DELETE /groups/:group_id/videos/:id(.:f ormat) videos#destroy search_group_documents GET /groups/:group_id/documents/sear ch(.:format) documents#search download_group_document GET /groups/:group_id/documents/:id/ download(.:format) documents#download group_documents GET /groups/:group_id/documents(.:fo rmat) documents#index POST /groups/:group_id/documents(.:fo rmat) documents#create new_group_document GET /groups/:group_id/documents/new( .:format) documents#new edit_group_document GET /groups/:group_id/documents/:id/ edit(.:format) documents#edit group_document GET /groups/:group_id/documents/:id( .:format) documents#show new_user_like GET /users/:user_id/like/new(.:forma t) likes#new edit_user_like GET /users/:user_id/like/edit(.:form at) likes#edit GET /users/:user_id/like(.:format)
likes#show PUT /users/:user_id/like(.:format)
likes#update DELETE /users/:user_id/like(.:format)
likes#destroy user_profile POST /users/:user_id/profile(.:format ) profiles#create new_user_profile GET /users/:user_id/profile/new(.:fo rmat) profiles#new edit_user_profile GET /users/:user_id/profile/edit(.:f ormat) profiles#edit GET /users/:user_id/profile(.:format ) profiles#show PUT /users/:user_id/profile(.:format ) profiles#update DELETE /users/:user_id/profile(.:format ) profiles#destroy user_activities GET /users/:user_id/activities(.:for mat) activities#index POST /users/:user_id/activities(.:for mat) activities#create new_user_activity GET /users/:user_id/activities/new(. :format) activities#new edit_user_activity GET /users/:user_id/activities/:id/e dit(.:format) activities#edit user_activity GET /users/:user_id/activities/:id(. :format) activities#show PUT /users/:user_id/activities/:id(. :format) activities#update DELETE /users/:user_id/activities/:id(. :format) activities#destroy search_user_posts GET /users/:user_id/posts/search(.:f ormat) posts#search user_posts GET /users/:user_id/posts(.:format) posts#index POST /users/:user_id/posts(.:format) posts#create new_user_post GET /users/:user_id/posts/new(.:form at) posts#new edit_user_post GET /users/:user_id/posts/:id/edit(. :format) posts#edit user_post GET /users/:user_id/posts/:id(.:form at) posts#show PUT /users/:user_id/posts/:id(.:form at) posts#update DELETE /users/:user_id/posts/:id(.:form at) posts#destroy search_user_comments GET /users/:user_id/comments/search( .:format) comments#search user_comments GET /users/:user_id/comments(.:forma t) comments#index POST /users/:user_id/comments(.:forma t) comments#create new_user_comment GET /users/:user_id/comments/new(.:f ormat) comments#new edit_user_comment GET /users/:user_id/comments/:id/edi t(.:format) comments#edit user_comment GET /users/:user_id/comments/:id(.:f ormat) comments#show PUT /users/:user_id/comments/:id(.:f ormat) comments#update DELETE /users/:user_id/comments/:id(.:f ormat) comments#destroy search_user_events GET /users/:user_id/events/search(.: format) events#search user_events GET /users/:user_id/events(.:format) events#index POST /users/:user_id/events(.:format) events#create new_user_event GET /users/:user_id/events/new(.:for mat) events#new edit_user_event GET /users/:user_id/events/:id/edit( .:format) events#edit user_event GET /users/:user_id/events/:id(.:for mat) events#show PUT /users/:user_id/events/:id(.:for mat) events#update DELETE /users/:user_id/events/:id(.:for mat) events#destroy GET /users/:user_id/documents/search (.:format) documents#search GET /users/:user_id/documents(.:form at) documents#index POST /users/:user_id/documents(.:form at) documents#create GET /users/:user_id/documents/new(.: format) documents#new GET /users/:user_id/documents/:id/ed it(.:format) documents#edit GET /users/:user_id/documents/:id(.: format) documents#show PUT /users/:user_id/documents/:id(.: format) documents#update DELETE /users/:user_id/documents/:id(.: format) documents#destroy search_user_health_records GET /users/:user_id/health_records/s earch(.:format) health_records#search GET /users/:user_id/health_records(. :format) health_records#index POST /users/:user_id/health_records(. :format) health_records#create GET /users/:user_id/health_records/n ew(.:format) health_records#new GET /users/:user_id/health_records/: id/edit(.:format) health_records#edit GET /users/:user_id/health_records/: id(.:format) health_records#show audience#index cheesecake /cheesecake(.:format)
cheesecake#index update_cheesecake /update_cheesecake(.:format)
cheesecake#update ties /ties(.:format)
ties#index tags /tags(.:format)
tags#index api_keygen /api/keygen(.:format)
api#create_key api_user /api/user/:id(.:format)
api#users api_me /api/me(.:format)
api#users api_my_home /api/me/home(.:format)
api#activity_atom_feed {:format=>"atom"} api_user_activities /api/user/:id/public(.:format)
api#activity_atom_feed {:format=>"atom"} api_contacts /api/me/contacts(.:format)
contacts#index {:format=>"json"} api_subject_contacts /api/subjects/:s/contacts(.:format)
contacts#index {:format=>"json"} resque_server /resque
Resque::Server /.well-known/host-meta(.:format)
frontpage#host_meta subject_lrdd /subjects/lrdd/:id(.:format)
subjects#lrdd avatars GET /avatars(.:format)
avatars#index POST /avatars(.:format)
avatars#create new_avatar GET /avatars/new(.:format)
avatars#new edit_avatar GET /avatars/:id/edit(.:format)
avatars#edit avatar GET /avatars/:id(.:format)
avatars#show PUT /avatars/:id(.:format)
avatars#update DELETE /avatars/:id(.:format)

atd commented 12 years ago

It seems to me that there is a collision in routes. At the begining of the output, you have the user routes:

GET /users/:id(.:format) users#show

Later, in the devise routes, you have:

destroy_user_session GET /users/logout(.:format) devise/sessions#destroy

Notice that they use the same path, so when requesting a GET to /users/logout, the Rails routing applies the first one instead of the last.

I would recommend using DELETE for logout. This is the default in last devise's versions.

Anyway, I am closing the bug, since this is a devise related issue and has nothing to do with Social Stream.

remware commented 12 years ago

Thanks for troubleshooting. Where should I do the changes ?

atd commented 12 years ago

You can ask for help in devise's google group. I am sure they will be happy to help you.

http://groups.google.com/group/plataformatec-devise