title: Rails Grape ActionController::RoutingError (No route matches [GET] "/api/v1/user_locations"):
body: <p>I have used the grape and swagger for Rails backend - API application Rails 6</p>
  <p>I have used the following gems for the</p>
  <pre><code>gem 'grape'
  gem 'grape-swagger'
  gem 'grape-swagger-rails'
  gem 'grape-jbuilder'
  </code></pre>
  <p>I have created one controller UserLocations</p>
  <pre><code> module API        
    module V1
     class UserLocations &lt; API::V1::Base
     include API::Defaults
  
      resource :user_locations do
          desc 'Get User Locations',
                headers: {
             'Authorization' =&gt; { description: 'Authorization Header', required: true },
             'Access-Token' =&gt; { description: 'Access Token', required: true }
           }
          params do    
              
              optional :filter, type: JSON, desc: 'Filter object' do                  
                  optional :gender, type: String, desc: 'Male/Female'
                  optional :user_type, type: String, desc: 'User Type Guest/Registered'
              end       
              
          end
  
          get '/', jbuilder: 'user_locations/user_locations.json.jbuilder' do
              authenticate!
              binding.pry
              if params[:user_locations_ids].present?
                  @users_locations = UserLocation.where(id: params[:user_locations_ids].map(&amp;:to_i))
                  return
              end
                  @user_locations = UserLocation.includes(user: [:user_profile, :verification, car_detail: [:brand]])
                  .select(&quot;user_profiles.username, user_profiles.gender, user_profiles.dob, user_profiles.user_type, 
                  verifications.status, brands.name, user_locations.location_time, user_locations.city, 
                  user_locations.state, user_locations.country, user_locations.postcode, user_locations.road&quot;)
                  .references(user: [:user_profile, :verification, car_detail: [:brand]])
              end
                  
          end          
      end
  end    
  </code></pre>
  <p>end
  end</p>
  <p>I have created the user_locations.json.builder file in user_locations folder in view</p>
  <p>My routes.rb file</p>
  <pre><code>Rails.application.routes.draw do
   mount API::Base =&gt; '/api'
   mount GrapeSwaggerRails::Engine =&gt; '/swagger'
  end
  </code></pre>
  <p>I am getting the following error</p>
  <pre><code>ActionController::RoutingError (No route matches [GET] &quot;/api/v1/user_locations&quot;):
  </code></pre>