migrate restful-authentication in rails 4 - ruby-on-rails

I want to migrate Rails 2 app to Rails 4. I have successfully migrated in Rails 3. Now I have a big problem with restful-authentication. It's not working for rails 4 so I need to migrate in devise but I don't want any changes with thousands of existing users.
Is it better to migrate in devise or is there some other alternative for restful-authentication?

restful_authentication is no longer being maintained so I recommend migrating to an alternative like devise. With a bit of configuration you can set up devise to work with the passwords that have been encrypted through restful_authentication. There's guide on their github page on how to do it: https://github.com/plataformatec/devise/wiki/How-To:-Migrate-from-restful_authentication-to-Devise

Related

how to create web service Api in rails 4?

can anyone help me how to create a web service API in rails 4. I know how create web service API in ruby 1.8.7 and rails 2.3.5 with action web service gem. When I am trying to use https://github.com/datanoise/actionwebservice gem in rails 4, I am getting deprecated errors.I want to upgrade my web service app. Please help me.
Rails-API looks promising, because it will be part of Rails core in Rails 5.
Rails-API
Rails-API is a subset of a normal Rails application, because API only applications don't require all functionality that a complete Rails application provides. so, it compatible well with old Rails versions. I don't know compatibility exactly, but I'm using it with Rails 3.2.x
There are another proper framework for this purpose, for example, Sinatra, Grape, but If you familiar with Rails, Rails-API will be the best choice.
Actionwebservice is long deprecated, in favour of REST API's. At my previous job we used a fork of actionwebservice in a rails 3 project.
Since there is no maintainer anymore for the actionwebservice gem, that fork never got merged back. If you check the fork history, a lot of people are fixing and partially updating it, but it is scattered all over the place.
Afaik none of the forks were updated to use rails 4. But using a rails 3 fork might just work.
If you really need to build a SOAP API server with Rails, imho your best option is to take a look at Wash-out, but you will have to re-write your API code.

CMS for rails 2 app

I am currently working on a 7 year old project which is running on Rails 2.3. Are there any CMS's similar to Refinery CMS or Active Admin that still run on this version of Rails?
I'd prefer to use a gem like Refinery or Active Admin rather than creating one myself.
We've used RadiantCMS in our 2.3.x Rails apps, give that a try.

Migrating from restful_authentication to Devise with Rails 2.3.14

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?
Re: Is there a simple way to check? The short answer is no.
To know what Devise gems to use, just follow the directions in the devise wiki - you just need devise and devise-encryptable according to the wiki.
Re: Which one to do first: Whatever you decide to do, its a good idea to have a stable branch before attempting an upgrade. So either you a) upgrade Rails + get restful_auth working, or b) use Devise + upgrade Rails - just avoid trying to do both at the same time.
a) seems possible if you use https://github.com/Satish/restful-authentication . It's a fork of the original project, and neither are as active as Devise ( https://www.ruby-toolbox.com/categories/rails_authentication ). You may choose to upgrade your authentication system to devise anyway, which leads us to...
b) probably the road-more-travelled. You should be able to find plenty of (Rails 2.3) upgrade instructions for restful_authentication->Devise. Get your specs green, then attempt the Rails 3 upgrade.

Import Devise 1.1.8 credentials into 2.0.0

I have an export of the users table from a Rails 3.0/Devise 1.1.8 app. I would like to seed these into a Rails 3.1/Devise 2.0 app. I imported that data via CSV and configured Devise with the same pepper value as the old app, however users are not able to log in. Bcrypt is/was used in both cases.
I think what I'm missing is that Devise 1 stored the salt in a separate field, but 2.0 puts it in the encrypted password string. Is there a way to migrate my data into the new app properly?
The best idea is to follow this: https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0, which basically recommends that you upgrade to 1.5 first, then upgrade all the way to 2.0. I think its pretty straight forward from that wiki explanation.

Migrate from restful_authentication to devise

i've been using rails 2 for a project and restful_authentication with it. Recently, i changed that project to rails 3 and i found out about devise, that to my eyes seems a much better solution that restful_authentication.
Therefore, i decided that it would be a good idea to migrate to devise, but it seems that the procedure is pretty tedious and error prone. I would like to ask you if you know of any good resource that describes the procedure, because doing it from scratch is a bit of a hassle.
rails generate devise:install
rails generate devise User
rake db:migrate
That's all there is for now, you get routes and functionality like /users/sign_(in|out|up) from start.
Resources:
Railscasts "Introducing Devise"
Devise Readme
Example application
You can try Migrating from Restful Authentication to Devise, but so far nothing for me. :(

Resources