0

I am in the process of using the rails upgrade plugin (https://github.com/rails/rails_upgrade) to bring the application from 2.3.14 to 3.2. The plugin identified "restful_authentication" as something that needed to be replaced. After some research I decided to try to migrate to Devise. I started looking at https://github.com/plataformatec/devise/wiki/How-To:-Migrate-from-restful_authentication-to-Devise, the issue I ran into is that these instructions are not meant for Rails 2.3.14. I can figure out how to make most of it work for 2.3.14, but the biggest block I have ran into is that I am not sure which versions of Devise, Devise-encryptable and other gems to use. Is there an simple way to check? Alliteratively am I making a mistake in trying to migrate to devise before I upgrade, should it be done the other way around?

4

1 回答 1

1

Re: 有没有简单的检查方法?最简洁的答案是不。

要知道要使用什么 Devise gems,只需按照设计 wiki 中的说明进行操作 - 您只需要根据 wiki 进行设计和可设计加密。

回复:先做哪一个:无论您决定做什么,在尝试升级之前拥有一个稳定的分支是个好主意。因此,要么你 a) 升级 Rails + 让 restful_auth 工作,要么 b) 使用 Devise + 升级 Rails - 只是避免同时尝试两者。

a) 如果您使用https://github.com/Satish/restful-authentication似乎是可能的。它是原始项目的一个分支,并且都不像 Devise ( https://www.ruby-toolbox.com/categories/rails_authentication ) 那样活跃。您可以选择升级您的身份验证系统以进行设计,这导致我们...

b) 可能是人迹罕至的道路。您应该能够找到大量(Rails 2.3)升级说明,用于 restful_authentication->Devise。让您的规格绿色,然后尝试 Rails 3 升级。

于 2013-05-14T14:18:46.293 回答