title: Why i get No route matches [GET] "/session" while it's using DELETE in routes file?
body: <p>I'm working on Rails4 app, and using Monban for authentication.
  When I run <code>rails g monban:scaffold</code> it creates several files such as:</p>
  
  <p>routes.rb</p>
  
  <pre><code>resource :session, only: [:new, :create, :destroy]
  resources :users, only: [:new, :create]
  </code></pre>
  
  <p>sessions_controller.rb</p>
  
  <pre><code>class SessionsController &lt; ApplicationController
    respond_to :html
  
    def new
    end
  
    def create
      user = authenticate_session(session_params)
      sign_in(user) or set_flash_message
      respond_with user, location: root_path
    end
  
    def destroy
      sign_out
      redirect_to root_path
    end
  
    private
  
    def session_params
      params.require(:session).permit(:email, :password)
    end
  end
  </code></pre>
  
  <p>when I run <code>rake routes</code> i get:</p>
  
  <pre><code>     Prefix Verb   URI Pattern            Controller#Action
         root GET    /                      homes#show
      session POST   /session(.:format)     sessions#create
  new_session GET    /session/new(.:format) sessions#new
              DELETE /session(.:format)     sessions#destroy
        users POST   /users(.:format)       users#create
     new_user GET    /users/new(.:format)   users#new
  </code></pre>
  
  <p>Inside <code>views/layouts/application.html.erb</code> I added: </p>
  
  <pre><code>&lt;% if signed_in? %&gt;
      &lt;%= current_user.username %&gt;
      &lt;%= link_to 'Sign out', session_path, method: :delete %&gt;
  &lt;% else %&gt;
      &lt;%= link_to 'Sign in', new_session_path %&gt;
      &lt;%= link_to 'Sign up', new_user_path %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>When I run the app, I can Sign in but when I 'Sign out' I get an error:
      <code>No route matches [GET] "/session"</code></p>
  
  <p>From what I see here "as I understand", destroy is looking for GET while it's using DELETE as it shouting above, Right??</p>
  
  <p>What am I missing here or what is wrong?
  Thanks</p>
  
  <p><strong>== UPDTAE ==</strong></p>
  
  <p>It seems like, it's related to JavaScript error, because I disabled jQuery from application.js. The reason for that is, I got an error <code>Circular dependency detected while autoloading constant HomesController</code> when I ran the app for it's 1st time after created it. Here are what I had changed, added 'Monban' gem, added <code>root to: 'homes#show', via: :get</code> to routes and created HomesController with a show method.</p>
  
  <p>When I searched online, I found others fixed similar issues 'if not the same' by disable jQuery from application.js.</p>
  
  <p>When I did that, the app worked fine, but later on I ran into that issue above.</p>
  
  <p>Now to get fix both issue I got rid of 'Turbolinks' gem and it's association across the app.</p>
  
  <p>Searching more about <code>Circular dependency detected while autoloading constant HomesController</code> issue, I found <a href="https://stackoverflow.com/questions/19767202/circular-dependency-detected-while-autoloading-constant">Circular dependency detected while autoloading constant</a> which is an interesting to know "if this is true" that Maverics could be the reason. Last week I updated my OSX from Mountain Lion to Maverics, before that I had never faced any similar issues.</p>
  
  <p>I don't know what is causing these issues, does any know? I hope not Maverics.</p>