Shawn Lindsey

RefineryCMS + RVM + MYSQL + REE + OSX 10.6.6

My Current Workflow For Getting A New RefineryCMS Application Running Locally

For many of my web development projects where the client needs to be able to update their own website I build the site with Refinery CMS as a core component.

Refinery CMS lets the client add pages, and update images & text without having to go through a web developer.

For those getting started with Refinery I am outlining my process as it may be helpful to see a workflow that works.  This does assume you have RVM, MYSQL, and OSX, the Ruby Enterprise Edition 1.8.7... etc. This is not a complete "from nothing to Refinery" setup. I am assuming you have a pretty up to date development environment or know how to set one up.

If you are running Ruby 1.9.2 you can tweek this post just a bit to get running on 1.9.2.

Create a gemset for the project with RVM

rvm gemset create project-name

Create a directory for the project with the same name as the gemset

mkdir project-name

In project directory create your .rvmrc file and add ruby version and gemset

rvm use ree

cd project-name

vi .rvmrc

In .rvmrc this is my only line >> rvm use ree@project-name

Install gems for this RVM managed project

gem install rails

gem install refinerycms

gem install mysql2

gem install bundler

Run RefineryCMS command to build project

refinerycms project-name -d mysql (even though you are in directory "project-name" this will create another directory "project-name" within it)

This will create the following error when the RefineryCMS skeleton is being built...

"Library not loaded: libmysqlclient.16.dylib"

Now the fun... For some reason the database won't get built. After some research a.k.a. Google... here is the fix

Run this command in /project-name (not in /project-name/project-name that was created by refinerycms command)

sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib ~/.rvm/gems/ree-1.8.7-2010.02@gem-set-name/gems/mysql2-0.2.XX/lib/mysql2/mysql2.bundle

In the above you have to change "gem-set-name" to your project-name and the "XX" to the correct version of mysql gem you are using.  You can get these by looking through the output that was created during the "refinerycms" command.

Rerun the RefineryCMS command with --force

refinerycms project-name -d mysql --force (note the --force)

Sucess! Start the server up

cd project-name

rails server

http://localhost:3000/

You are up and running RefineryCMS locally!

 

Shawn Lindsey

Categories

Other Posts

RSS Feed

Subscribe

Archives