LoginSignup
2
2

More than 3 years have passed since last update.

【Rails】deviseを使ったサインアップ機能 wrong number of arguments (given 0, expected 1)というエラー

Posted at

エラー詳細

deviseを導入して、サインアップを実行したところ、このような内容のエラーが吐かれた。

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

解決法

user.rb
has_secure_password

を消す。
has_secure_passwordとは、パスワードをDBに保存する時に、暗号化して保存してくれるrailsの機能のこと。deviseを使う場合は不要なので、コメントアウトしておきましょう。

参考にした記事

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

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2