Search code examples
ruby-on-railsrailstutorial.org

No route matches [GET] "/user/1" following Michael Hartls rails tutorial


I am on listing 7.3, and am getting a no route error. I am very new to rails, so what other files can I provide to help debug by no route.

Here is my routes files

SampleApp::Application.routes.draw do
  resources :users

  root to: 'static_pages#home'

  match '/signup',  to: 'users#new'
  match '/signup', to: 'users#new'
  match '/help',    to: 'static_pages#help'
  match '/about',   to: 'static_pages#about'
  match '/contact', to: 'static_pages#contact'


end

Solution

  • You should use "/users/1", not "/user/1".