Install crabgrass using rbenv

Installing rbenv

sudo aptitude install ruby1.8 ruby-dev libmysql-ruby mysql-server git libxslt-dev libxml2-dev libsqlite3-dev ruby-sqlite3 graphicsmagick libmysqlclient-dev libreadline-dev
# graphicsmagick for the libraries
# libreadlyne-dev to have ruby (script/console) with readline support

cd ~/home
git clone ~/.rbenv
mkdir .rbenv/plugins
git clone .rbenv/plugins/ruby-build

nano ~/.zshrc #or ~/.bashrc
    export PATH="$HOME/.rbenv/bin:$PATH"
  eval "$(rbenv init -)"

source .zshrc

rbenv install 1.8.7-p358

cd cg-core/
rbenv local 1.8.7-p358

#gem upgrade # what was this for?
#gem update --system

installing cg

gem install rails --version 2.3.14
gem install machinist --version '~> 1.0'
gem install mocha --version '~> 0.10.0'
gem install --version 0.10.6 compass
gem install rake jsmin rdoc webrat sass haml minitest faker thin yard mysql thinking-sphinx RedCloth mime-types etherpad-lite sphinx passenger

rbenv rehash #to have the binaries like rails

rake --trace create_a_secret

rake gems:install

cp config/database.yml.example config/database.yml
vim config/database.yml

# create db manually if don't want to use root user

rake db:create
rake db:schema:load
rake db:fixtures:load # to load example data
rake db:seed # what is this for?

script/server thin BOOST=1 # thin and BOOST speed it a bit
# by default will run in development mode?

Useful commands

rbenv local #to see ruby version used

ruby -v

gem -v # to see gem version used
gem list # to see list of gems
gem list -a
gem list -d rake # to see local versions of rake

rake -v # to see rake version used


Not necessarily to use the shell integration, you can simply set the RBENV_VERSION variable yourself like this:
$ export RBENV_VERSION = jruby-1.7.1