Devise: undefined method `apply_schema=' for Devise:Module

Created on 12 Nov 2013  路  8Comments  路  Source: heartcombo/devise

I have added gem 'devise', '3.2' to my gemfile then typed bundle install before submitting this issue , when i am trying to run rake db:migrate i am getting this error

undefined methodapply_schema=' for Devise:Module
/home/dexter/Desktop/Triton/config/initializers/devise.rb:14:in block in <top (required)>' /home/dexter/.rvm/gems/ruby-1.9.3-p194/gems/devise-3.2.0/lib/devise.rb:287:insetup'`

in my gemfile rails version 3.2.12 and ruby 1.9.3

All 8 comments

When upgrading versions of Devise it is instructive to keep the CHANGELOG handy. In this case, it looks like your configuration is setting an option that no longer exists.

so what i can do ? you did not tell me! how to solve my issue ? , even without updating nothing helped me, all i did pushed my application to github then i cloned it again and now i cant use it because this error , what i can do ???

Just remove it. The CHANGELOG mentions how it has no effect since 2.1.0.

when i remove the apply_schema it raises more errors
rake aborted! undefined methoduse_salt_as_remember_token=' for Devise:Module`
also when i comment this it will rails another one

Same deal, remove them. It is all documented in the CHANGELOG.

Just i want to make sure : i commented apply_schema line , commented use_salt_as_remember line and added this into devise.rb

config.secret_key = '721139fdeb213ce3e808a486040d72e86afa71c455426db941e9da47c188c8a6d36aadf2e181add2c03ea0d16415928f63d161b4914df08e0551cae1cb11647b'

then my error is gone, in this case devise will work normally or will i have errors in the future ?

@josevalim am i in the right path ? or i will face more problems in the future because of those steps i have done ?

@Code-Vortex per the changelog linked elsewhere in this thread, the options you removed are removed from devise and don't do anything. When you upgrade versions of devise you need to review the changelog and take into consideration which features your app uses and how you're affected - we cannot do that part other than to tell you what has changed in devise and how you can use the updated version.

Was this page helpful?
0 / 5 - 0 ratings