I'm a beginner.
I am studying the setting of devise of rails.
As it stands,
install devise
Creating a model
Edit migration
Generating and editing view files
I was able to do it.
And when I try to register as a user on the screen, I get a Routing Error.
I checked the setting process on other sites, but this error cannot be cleared.
Could you tell me about the rails devise settings?
Please write your question in detail here.
(Example) I am making a ●● system with PHP (CakePHP).
The following error message occurred while implementing the features.
Routing Error
No route matches [POST] "/ users/sign_up"
Corresponding source code
[routes.rb]
Rails.application.routes.draw do
devise_for: users
root to: "toppage # index"
end
[Toppage_Controller.rb]
class TpopageController
What I tried
Reconfirmation of devise implementation flow
Try putting resouces in the user controller
rails 6.0.0
-
Answer # 1
-
Answer # 2
bin/rails routes
When you execute the command, the route list is displayed.
Among them/ users/sign_up
Why don't you check if it is included?Also, in the error message
No route matches [POST] "/ users/sign_up"
There is, but sign_up isGET requestI think that, but the newly created link may be sent by the POST method. In viewbutton_to
Do you use?
Related articles
- ruby on rails - routing error when pressing rails submit button
- ruby on rails - modify the subject of devise mail with railsenv
- ruby - efficient writing of rails routing and actions
- ruby on rails - cart function routing error cannot be resolved
- ruby on rails - after installing devise on rails6, routing error occurs, so i want to eliminate it
- ruby on rails - about routing errors in devise
- ruby on rails - [rails] i want to define routing using the resources method
- ruby on rails - [rails] routing error occurs in devise_token_auth and the registration screen cannot be displayed
- ruby - i have a question about rails routing errors
- ruby - when i try to update rails, i get a routing error
- ruby on rails 6 - about rails routing error no route matches [get] "/"
- ruby - about routing using rails collection
- ruby - about how to save db with rails devise
- ruby - about rails routing
- ruby on rails 6 - raila6 nested routing
- ruby on rails - i want to resolve a routing error
- ruby on rails - rails: the combination of devise and simple_form makes the user registration form, and the username value become
- ruby on rails - the concept of routing regarding rails api mode
- ruby - please tell me the solution of rails devise (given 0, expected 1)!
- i am creating a bulletin board with rubyonrails, but i cannot display the user name
- ruby - the method defined in the model cannot be used
- ruby - please tell me the solution of rails devise (given 0, expected 1)!
- ruby - no error message is displayed during new registration
- ruby on rails - even though i can log in with rails, the current_user specified in the user details view becomes nil and an erro
- ruby on rails - phenomenon that the test that should be an "rspec" error passes
- ruby on rails - nomethoderror in itemscontroller # new error
- ruby - i can't transition to my page for each user after logging out (rails)
- ruby on rails - after installing devise on rails6, routing error occurs, so i want to eliminate it
I don't know if the terminal was buggy, but it worked when I rebuilt it.