1

In the process of installing Elasticsearch (which works fine) the ability to log out of my app isn't working anymore. I get the following error message.

    No route matches [GET] "/users/sign_out"

    Rails.root: C:/Users/mdavis/workspace/intakelog

    Application Trace | Framework Trace | Full Trace

    Routes match in priority from top to bottom

When I run Rake Routes, I see the correct path.

$ rake routes
                  Prefix Verb   URI Pattern                                    C                                                                   ontroller#Action
              insurances GET    /insurances(.:format)                          i                                                                   nsurances#index
                         POST   /insurances(.:format)                          i                                                                   nsurances#create
           new_insurance GET    /insurances/new(.:format)                      i                                                                   nsurances#new
          edit_insurance GET    /insurances/:id/edit(.:format)                 i                                                                   nsurances#edit
               insurance GET    /insurances/:id(.:format)                      i                                                                   nsurances#show
                         PATCH  /insurances/:id(.:format)                      i                                                                   nsurances#update
                         PUT    /insurances/:id(.:format)                      i                                                                   nsurances#update
                         DELETE /insurances/:id(.:format)                      i                                                                   nsurances#destroy
        new_user_session GET    /users/sign_in(.:format)                       d                                                                   evise/sessions#new
            user_session POST   /users/sign_in(.:format)                       d                                                                   evise/sessions#create
    destroy_user_session DELETE /users/sign_out(.:format)                      d                                                                   evise/sessions#destroy
           user_password POST   /users/password(.:format)                      d                                                                   evise/passwords#create
       new_user_password GET    /users/password/new(.:format)                  d                                                                   evise/passwords#new
      edit_user_password GET    /users/password/edit(.:format)                 d                                                                   evise/passwords#edit
                         PATCH  /users/password(.:format)                      d                                                                   evise/passwords#update
                         PUT    /users/password(.:format)                      d                                                                   evise/passwords#update
cancel_user_registration GET    /users/cancel(.:format)                        d                                                                   evise/registrations#cancel
       user_registration POST   /users(.:format)                               d                                                                   evise/registrations#create
   new_user_registration GET    /users/sign_up(.:format)                       d                                                                   evise/registrations#new
  edit_user_registration GET    /users/edit(.:format)                          d                                                                   evise/registrations#edit
                         PATCH  /users(.:format)                               d                                                                   evise/registrations#update
                         PUT    /users(.:format)                               d                                                                   evise/registrations#update
                         DELETE /users(.:format)                               d                                                                   evise/registrations#destroy
         search_accounts GET    /accounts/search(.:format)                     a                                                                   ccounts#search
           account_notes POST   /accounts/:account_id/notes(.:format)          n                                                                   otes#create
        new_account_note GET    /accounts/:account_id/notes/new(.:format)      n                                                                   otes#new
       edit_account_note GET    /accounts/:account_id/notes/:id/edit(.:format) n                                                                   otes#edit
            account_note PATCH  /accounts/:account_id/notes/:id(.:format)      n                                                                   otes#update
                         PUT    /accounts/:account_id/notes/:id(.:format)      n                                                                   otes#update
                         DELETE /accounts/:account_id/notes/:id(.:format)      n                                                                   otes#destroy
                accounts GET    /accounts(.:format)                            a                                                                   ccounts#index
                         POST   /accounts(.:format)                            a                                                                   ccounts#create
             new_account GET    /accounts/new(.:format)                        a                                                                   ccounts#new
            edit_account GET    /accounts/:id/edit(.:format)                   a                                                                   ccounts#edit
                 account GET    /accounts/:id(.:format)                        a                                                                   ccounts#show
                         PATCH  /accounts/:id(.:format)                        a                                                                   ccounts#update
                         PUT    /accounts/:id(.:format)                        a                                                                   ccounts#update
                         DELETE /accounts/:id(.:format)                        a                                                                   ccounts#destroy
                programs GET    /programs(.:format)                            p                                                                   rograms#index
                         POST   /programs(.:format)                            p                                                                   rograms#create
             new_program GET    /programs/new(.:format)                        p                                                                   rograms#new
            edit_program GET    /programs/:id/edit(.:format)                   p                                                                   rograms#edit
                 program GET    /programs/:id(.:format)                        p                                                                   rograms#show
                         PATCH  /programs/:id(.:format)                        p                                                                   rograms#update
                         PUT    /programs/:id(.:format)                        p                                                                   rograms#update
                         DELETE /programs/:id(.:format)                        p                                                                   rograms#destroy
             pages_index GET    /pages/index(.:format)                         p                                                                   ages#index
                    root GET    /                                              p                                                                   ages#index

This is the error message for the server logs

ActionController::RoutingError (No route matches [GET] "/javascripts/default.js"):
  actionpack (4.1.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (4.1.8) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.1.8) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.1.8) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.1.8) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.1.8) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.1.8) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.1.8) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.1.8) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.1.8) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.1.8) lib/action_dispatch/middleware/static.rb:84:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  railties (4.1.8) lib/rails/engine.rb:514:in `call'
  railties (4.1.8) lib/rails/application.rb:144:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'


  Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.0ms)
  Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/templates/routes/_route.html.erb (3.0ms)
  Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.0ms)
  Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (56.0ms)


Started GET "/users/sign_out" for 127.0.0.1 at 2015-11-13 11:43:11 -0500

ActionController::RoutingError (No route matches [GET] "/users/sign_out"):
  actionpack (4.1.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (4.1.8) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.1.8) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.1.8) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.1.8) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.1.8) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.1.8) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.1.8) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.1.8) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.1.8) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.1.8) lib/action_dispatch/middleware/static.rb:84:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  railties (4.1.8) lib/rails/engine.rb:514:in `call'
  railties (4.1.8) lib/rails/application.rb:144:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

I looked at the following post thinking it might be related but, I can't figure this out.

Rails ExecJS::ProgramError in Pages#home?

Copy of application.html.erb

<!DOCTYPE html>
<html>
<head>
  <title></title>
  <%= render 'layouts/bootstrap' %>
  <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
 <%= javascript_include_tag "default", "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>
  <%= render 'layouts/bootstrap' %>
</head>
<body>
    <div class="container">
<%= render "layouts/navbar" %>
</div>
<div class="container-fluid">
  <div class="container">
    <% flash.each do |name, msg| %>
      <% if msg.is_a?(String) %>
        <div class="alert alert-<%= name == "notice" ? "success" : "danger" %> alert-dismissable">
          <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
          <%= content_tag :div, msg, :id => "flash_#{name}" %>
        </div>
         </div>
         </div>
      <% end %>
    <% end %> 
<%= yield %>
<div class="container">
<div class="footer">
<%= render "layouts/footer" %>
</div>
</div>
</body>
</html>
Community
  • 1
  • 1
M.T Davis
  • 1,078
  • 2
  • 10
  • 31
  • Interesting: this seems to have been an issue before, and was unresolved for the previous OP too. http://stackoverflow.com/questions/19749311/signing-out-with-devise-geting-instead-of-posting-in-rails-4-every-time – James Milani Nov 13 '15 at 21:10
  • Are you using Turbolinks? Have you killed the gem, require statement, and calls to it in your views? Obviously, you need to bundle and restart your server as well. That could at least let us know if it's related or not... – James Milani Nov 13 '15 at 21:17
  • also, after restarting your server, show us the output of the HTML... it's obviously calling `get` instead of `delete` – davegson Nov 17 '15 at 11:02