Forum: Ruby on Rails Using scaffolding

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:

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.

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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.