簡體   English   中英

Ruby On Rails升級到3.2導致$ end錯誤

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM