ruby - Rails 4 - Invalid route name, already in use -


i have problem routing in rails 4 on production.

my config/route.rb:

rails.application.routes.draw    root to: redirect("/#{i18n.default_locale}", status: 302), as: :redirected_root   post '/rate' => 'rater#create', :as => 'rate'    scope ':locale', defaults: {locale: i18n.locale}     activeadmin.routes(self)   end    scope ':locale', locale: /#{i18n.available_locales.join("|")}/       devise_for :admin_users, activeadmin::devise.config     devise_for :users      # post '/rate' => 'rater#create', :as => 'rate'       root :controller => 'static', :action => 'index'      resources :categories      resources :authors      resources :messages      resources :books      resources :tags      resource :static      resource :users    end   # match '/:locale' => 'static#index'   # priority based upon order of creation: first created -> highest priority.   # see how routes lay out "rake routes".    # can have root of site routed "root"   # root 'welcome#index'    # example of regular route:   #   'products/:id' => 'catalog#view'    # example of named route can invoked purchase_url(id: product.id)   #   'products/:id/purchase' => 'catalog#purchase', as: :purchase    # example resource route (maps http verbs controller actions automatically):   #   resources :products    # example resource route options:   #   resources :products   #     member   #       'short'   #       post 'toggle'   #     end   #   #     collection   #       'sold'   #     end   #   end    # example resource route sub-resources:   #   resources :products   #     resources :comments, :sales   #     resource :seller   #   end    # example resource route more complex sub-resources:   #   resources :products   #     resources :comments   #     resources :sales   #       'recent', on: :collection   #     end   #   end    # example resource route concerns:   #   concern :toggleable   #     post 'toggle'   #   end   #   resources :posts, concerns: :toggleable   #   resources :photos, concerns: :toggleable    # example resource route within namespace:   #   namespace :admin   #     # directs /admin/products/* admin::productscontroller   #     # (app/controllers/admin/products_controller.rb)   #     resources :products   #   end end 

each route return error: invalid route name, in use...

maybe know why happening? i'll grateful help.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -