0

我目前正在升级我的应用程序并在安装最新的 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
4

1 回答 1

1

您的问题似乎是这一行中多余的逗号:

  resources :retailers, :path => "linsbutiker", do

删除“do”之前的逗号,你应该没问题。

于 2012-11-06T15:04:40.217 回答