CruiseControl.rb and Rails 3 with RVM

Hello. There is no article how to configure CruiseControl.rb(ccrb) for Rails 3 with RVM on internet so far. That's pity. Let's fix it.

First, install ccrb (just download and unzip from
Create new ccrb project named 'your_project'.

Then let's open ~/.cruise/projects/your_project/cruise_config.rb with your favorite editor.
Uncomment next line:
project.build_command = './'
Add to your rails application so full path should be ~/.cruise/projects/your/project/work/ 
This file should contain next lines:
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
printf "ERROR: An RVM installation was not found.\n"


bundle install
bundle exec cucumber

Start ccrb and build.