[RUBY] [Rails] Sign-up function using devise error number of arguments (given 0, expected 1)

Error details

When I installed devise and performed sign-up, I got an error like this.

ArgumentError (wrong number of arguments (given 0, expected 1)):
wrong number of arguments (given 0, expected 1)

Solution

user.rb


has_secure_password

Erase. has_secure_password is a rails function that encrypts and saves the password when it is saved in the DB. It is not necessary when using devise, so comment it out.

Referenced articles

https://qiita.com/kents1002/items/4079e3d05d322febe00e https://qiita.com/shumpeism/items/4d8946ade2dbdccab31c

Recommended Posts

[Rails] Sign-up function using devise error number of arguments (given 0, expected 1)
ArgumentError (wrong number of arguments (given 0, expected 1)) error message
[Rails] How to resolve wrong number of arguments (given 2, expected 0..1) of user_id
[Note] Summary of rails login function using devise ①
[Rails] Implementation of new registration function in wizard format using devise
Implementation of user authentication function using devise (2)
Implementation of user authentication function using devise (1)
Implementation of user authentication function using devise (3)
[Rails] Implementation of search function using gem's ransack
[Rails 6] Implementation of inquiry function using Action Mailer
[Rails] Implementation of image enlargement function using lightbox2
[Rails] Implementation of PV number ranking using impressionist
[Rails] Test of star evaluation function using Raty [Rspec]
Implementation of Ruby on Rails login function (devise edition)
Japaneseization of Rails error messages [devise / Form objects, etc.]
What to do if you get an Argument Error: wrong number of arguments (given 2, expected 0) in your RSpec test
[Rails] Implementation of multi-layer category function using ancestry "Preparation"
[Rails] Implementation of multi-layer category function using ancestry "seed"
ArgumentError (wrong number of arguments (given 0, expected 1)) error message
[Rails] How to resolve wrong number of arguments (given 2, expected 0..1) of user_id
[Rails] Sign-up function using devise error number of arguments (given 0, expected 1)
What to do if you get an Argument Error: wrong number of arguments (given 2, expected 0) in your RSpec test
What to do if you get a wrong number of arguments error in binding.pry
Arguments of String.addingPercentEncoding (withAllowedCharacters :)
[Ruby] Questions and verification about the number of method arguments
[Rails] Implementation of multi-layer category function using ancestry "Editing form"
[Rails] Register by attribute of the same model using Devise
[Rails] Implementation of multi-layer category function using ancestry "Creation form"
Rails sorting function implementation (displayed in order of number of like)
[Rails] Implementation of tagging function using intermediate table (without Gem)
[Rails] Japanese localization of error message when using Form object
[Rails] Introduction of devise Basics
Search function using [rails] ransack
[Rails 6] Implementation of search function
[Rails] Implementation of category function
Ajax bookmark function using Rails
Error when using rails capybara
[Rails] Implementation of tutorial function
[Rails] Implementation of like function
[rails] error during devise installation
[Rails] Implementation of coupon function (with automatic deletion function using batch processing)
[Rails] Implementation of tag function using acts-as-taggable-on and tag input completion function using tag-it
[Rails] Japanese localization of error messages
[Rails] Implementation of CSV import function
[Rails] Asynchronous implementation of like function
[Rails] Implementation of image preview function
[Rails] Tag management function (using acts-as-taggable-on)
[Rails] Unexpected validation error in devise
About error handling of comment function
Kaminari --Added pagination function of Rails
[Rails] About implementation of like function
[Rails] Implementation of user withdrawal function
[Rails] Implementation of CSV export function
Japanese localization of error messages (rails)
[Rails] I will explain the implementation procedure of the follow function using form_with.