문제

I am using devise with Rails 4. I had a problem with some fields not rendering in the user views and I realised it's because of the attr_accessible that's not supported any more so I had a look around and came to the conclusion I should use the latest version of the gem (3.0.3).

And that's when the problem appeared:

I cannot run any rails commands now as I am getting the undefined method 'secret_key=' for Devise:Module (NoMethodError) error and it's not going away even if I downgrade the gem.

Rolling back to some previous git commit doesn't solve it, remove the gem and doing a bundle install again doesn't solve it, and I starting to think I should probably start from scratch.

Does anyone know how to walk past this?

도움이 되었습니까?

해결책

I believe this setting is only available in the more recent versions of Devise, 3.1.x and above. You should either upgrade the gem to this version or remove that line that references secret_key= from your config/initializers/devise.rb file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top