Using scaffolding

Hi all,

I’ve been following this online book:

I ran the commands:
rails generate scaffold User name:string email:string
bundle exec rake db:migrate

As I understand it I should be able to go to the following URL and it
should display a list of users:

However I get this error:

"Routing Error

No route matches [GET] “/users”

Try running rake routes for more information on available routes."

In the first chapter another application was created, could it be that
rails server is serving the first application instead of the one from
second chapter of the book?

Anyone any idea how to fix this issue?

Thanks in advance.


Maybe the routes.rb has not been updated with the new resource users.
Once check the routes.rb under config folder in your application and
place “resources :users”, if it is missing
Or you can also check the url http://localhost:3000/users/index,
sometimes its problem with scaffolding