Controller file name should be users_controller.rb
As you mentioned in comment you don't have any User model defined
. To create model run rails g model user name:string email:string
. This will create User
model with attributes name and email
.
Try Rails scaffolding
and see what files it creates(in controller, model and views
ignore other files for now) and see the contents of those files. To use scaffold for creating User
is as below:
rails g scaffold user name:string email:string
rake db:migrate