Some rake tasks to help migrate Radiant (v1.1.4) sites to Refinery (v3.0.4).
- Put these Ruby files in place in the respective Radiant and (new) Refinery apps
- You'll need to manually bring your layouts across and adapt accordingly, as well as images, javascripts and stylesheets.
- Run
rake export:json
in your Radiant app - Copy the resulting
dump.json
file into the Refinery app (or put it online somewhere - perhaps a private gist - if you're going to need to import in the production environment) - Add the salt column to your Refinery app's user model:
rails g migration add_salt_to_refinery_authentication_devise_users salt:string
- Run
rake db:migrate
in your Refinery app. - Run
rake import:pages import:assets import:users
in your Refinery app. - In a Rails console in your Refinery app, change your home page to have the root path. If it's the first page in the app (likely), this will do the trick:
Refinery::Page.first.update_attributes :link_url => '/'
Yes, the code in these files could be refactored to be elegant. My focus was on getting something to work - the fact that this could be potentially re-used by others is just a nice surprise :) Please, if you are going to use this, read and understand the code. It suited my needs, but it may not suit yours.