Category: Ruby

Ruby Env Config

I wanted to setup a Ruby development environment on my new Mac Pro (just for kicks!) and did so using a mashup of the resources below:

I’ve documented the steps followed below, mainly for my benefit though others may also find them useful. I’m running OSX 10.6.8.

[1]  update rubygems to latest version
$ sudo gem update –system

[2] create .profile and add PATH env variable settings
export PATH=$HOME/.gem/ruby/1.8/bin:$PATH

[3] install RVM (git installed with RVM by default).
https://rvm.beginrescueend.com/rvm/install/

[4] install ruby.
$ rvm install 1.8.7

[4.1] lose the redundant documentation by creating a .gemrc file in home with following content:
gem: –no-ri –no-rdoc

[5] while waiting for 4, create a gemfile in home dir using below settings below:

source :rubygems

# Build stuff
gem ‘bundler’
gem ‘rake’

# General stuff
gem ‘cucumber’
gem ‘rspec’

# Rails stuff
gem ‘capybara’
gem ‘coffee-rails’
gem ‘cucumber-rails’
gem ‘database_cleaner’
gem ‘rails’
gem ‘rspec-rails’
gem ‘sass-rails’

# Non Rails stuff
gem ‘sinatra’

[6] install bundler using:
$ sudo gem install bundler

[7] install various other gems including cucumber & rails using the file created in 5.
$ sudo bundle install

[8] Installing Homebrew makes the MySQL install much easier.
http://mxcl.github.com/homebrew/
$ homebrew install mysql

[9] follow the Homebrew mysql instructions to finish up. I had some additional issues too which were resolved here – http://stackoverflow.com/questions/4359131/brew-install-mysql-on-mac-os

$ mysql.server start
$ mysql -u root -p

All good. Now to get cracking on my web app!

Hello and Welcome

I'm Simon Knight, Tester turned Product Manager. Helping design awesome products for testers.

Archive

GiottoPress by Enrique Chavez