我目前正在升级我的应用程序,并在安装了最新的rails v。后,我收到此错误:
.../config/routes.rb:47: syntax error, unexpected keyword_end, expecting $end
但是我已经查看了,我的routes.file中没有遗漏或结尾?
Lensfinder::Application.routes.draw do
# replace devise_for :users with:
devise_for :users, :controllers => { :registrations => "users/registrations" }
resources :comments
root :to => "finder#index"
resources :categories, :prices, :profiles, :finder, :users
resources :services, :only => [:index, :create]
resources :retailers, :path => "linsbutiker", do
member do
post :vote_up
post :vote_down
end
end
resources :products, :path => "linser"
match 'shipping_info' => 'finder#shipping_info'
end
答案 0 :(得分:1)
您的问题在这一行中似乎是一个多余的逗号:
resources :retailers, :path => "linsbutiker", do
在“do”之前删除逗号,你应该没问题。