I am working on a couple client projects leveraging the Radiant Content Management System (http://www.radiantcms.org) and I thought it would be interesting to document the process I am going through to setup the production environment.

The base environment is the following:

The requirements for the project are

  • Radiant CMS 0.8.1
  • Extensions (drag_order, gallery, paperclipped, tinymce_filter)

I recommend creating a rails folder in your home directory and putting the radiant application in their.

Setup Dreamhost with mod_passenger

Create a new domain on your account
Make sure to set to domain home directory to where your Radiant application’s public directory will be

i.e. /home/USERNAME/rails/your_app_here/public

Setup Domain w/ mod_passenger

Setup Domain w/ mod_passenger

Setup Local Gem Repository

(source: Nate Clark’s DreamHost Your Own Packages and Gems)

Open .bash_profile

Add the following lines to .bash_profile

export PATH="$HOME/.packages/bin:$HOME/.gems/bin:${PATH}"
export GEM_HOME=$HOME/.gems
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8"

Execute the following at the command line

[USERNAME@deathlok ~/rails/test_app]source .bash_profile
[USERNAME@deathlok ~/rails/test_app]echo $PATH
[USERNAME@deathlok ~/rails/test_app]$ echo $GEM_PATH

Install Radiant

[USERNAME@deathlok ~]$ gem install radiant --version "= 0.8.1"
Building native extensions.  This could take a while...
Successfully installed RedCloth-4.2.2
Successfully installed radiant-0.8.1
2 gems installed
Installing ri documentation for RedCloth-4.2.2...
Installing ri documentation for radiant-0.8.1...
Installing RDoc documentation for RedCloth-4.2.2...
Installing RDoc documentation for radiant-0.8.1...
[USERNAME@deathlok ~]$

Confirm Radiant installed successfully

[USERNAME@deathlok ~]$ which radiant
[USERNAME@deathlok ~]$

Create your Radiant Application

Get into your rails directory and create your application

[USERNAME@deathlok ~/rails]$ radiant your_app_dir
 create  CHANGELOG
 create  INSTALL
 create  LICENSE
 create  README
 create  config
 create  config/environments
 create  config/environments/development.rb
 create  config/environments/production.rb
 create  config/environments/test.rb
 create  db
 create  log
 create  public

Modify config/environment.rb to point to your personal gems folder
Add the following line below # ENV['RAILS_ENV'] ||= ‘production’

ENV['GEM_PATH'] = '/home/USERNAME/.gems:/usr/lib/ruby/gems/1.8'

Bootstrap your Radiant Application

Get into your new app directory and modify config/database.yml to your appropriate database settings (mod_passenger defaults to run as PRODUCTION, so make sure to configure your production database)

rake production db:bootstrap

I recommend using the Empty template when prompted.

Go to your new domain and confirm if your app is working.

Radiant Login page

Radiant Login page