Forum: Ruby on Rails Using scaffolding

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2698376b86e2cc05ae63fec8f88f8025?d=identicon&s=25 unknown (Guest)
on 2014-01-29 00:10
(Received via mailing list)
Hi all,

I've been following this online book:
http://ruby.railstutorial.org/chapters/a-demo-app#...

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:
http://localhost:3000/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
the
rails server is serving the first application instead of the one from
the
second chapter of the book?

Anyone any idea how to fix this issue?

Thanks in advance.

G
A5c187df9d9ce9f45ba473cfb91aa515?d=identicon&s=25 Kishore Seemala (s_kishore)
on 2014-02-06 11:49
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
This topic is locked and can not be replied to.