简体   繁体   中英

Ruby On Rails Upgrading to 3.2 causing $end error

I'm currently upgrading my application and after installing the latest rails v. I get this error:

.../config/routes.rb:47: syntax error, unexpected keyword_end, expecting $end

However I have looked and I don't have a missing end or a end to much in my 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

Your problem appears to be an excess comma in this line:

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

Remove the comma before "do" and you should be ok.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM