2016-08-01 22 views
2

Ich versuche, eine App mit dem App-Composer-Tool von Rails zu erstellen. Ich benutze Devise mit confirmable. Ich erhalte den FehlerNoMethodError: undefinierte Methode `bestätigen! ' für # <Benutzer

rake db:seed 
rake aborted! 
NoMethodError: undefined method `confirm!' for #<User:0xa0b26ec> 

während des Installationsvorgangs.

Schon die user.rb Datei hat :confirmable

devise :database_authenticatable, :registerable, :confirmable, 
    :recoverable, :rememberable, :trackable, :validatable 

ich nicht in der Lage bin rake db:seed zu tun.

+0

Was ist die DEVISE-Version, die Sie verwenden? – Sravan

Antwort

6

Devise 4.2.0 hat die confirm! Methode depricated, müssen Sie Verwendung confirm statt.

4.2.0 - 2016-07-01

Umzüge: -

Remove the deprecated Devise::ParameterSanitizer API from Devise 3. Please use the #permit and #sanitize methods over #for. 

Remove the deprecated OmniAuth URL helpers. Use the fully qualified helpers (user_facebook_omniauth_authorize_path) over the scope based helpers (user_omniauth_authorize_path(:facebook)). 

Remove the Devise.bcrypt method, use Devise::Encryptor.digest instead. 

Remove the Devise::Models::Confirmable#confirm! method, use confirm instead. 

Remove the Devise::Models::Recoverable#reset_password! method, use reset_password instead. 

Remove the Devise::Models::Recoverable#after_password_reset method. 

Daraus

Remove the Devise::Models::Confirmable#confirm! method, use confirm instead.

Here is the refference

+0

Es hat funktioniert. Vielen Dank. –

+0

Sie können meine Antwort akzeptieren, wenn es Ihnen auf die richtige Weise geholfen hat? Wenn du willst. – Sravan