[英]Ruby On Rails Upgrading to 3.2 causing $end error
我目前正在升級我的應用程序,並在安裝了最新的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
您的問題似乎是此行中的多余逗號:
resources :retailers, :path => "linsbutiker", do
在“執行”之前刪除逗號,您應該沒問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.