Installing RVM and Rails OS X Mountain Lion

Installing RVM on OS X Mountain Lion.

1. Install command line tools for XCode.

http://developer.apple.com

2. Install RVM with stable ruby.

curl -L https://get.rvm.io | bash -s stable --ruby

3. Source the RVM install.

source /Users/owenbyrne/.rvm/scripts/rvm

4. Verify your RVM install and view installed ruby versions.

rvm list

5. Set your default ruby version (2.0.0 in this case).

rvm --default 2.0.0

6. Install Rails

gem install rails --no-rdoc --no-ri

Done!

Ruby on Rails Font Awesome setup

Setting up font awesome with Ruby on Rails is very quick and gives you access to all the font awesome…awesomeness.

Step 1.

Copy the font awesome files to app/assets/font

Step 2.

Add the font directory to the assets path in application.rb

config.assets.paths << Rails.root.join("app", "assets", "fonts")

Step 3.

Modify font-awesome.css as follows

@font-face {
  font-family: 'FontAwesome';
  src: url(/assets/fontawesome-webfont.eot);
  src: url(/assets/fontawesome-webfont.eot?#iefix) format('embedded-opentype'), url(/assets/fontawesome-webfont.woff) format('woff'), url(/assets/fontawesome-webfont.ttf) format('truetype'), url(/assets/fontawesome-webfont.svg#FontAwesome) format('svg');
  font-weight: normal;
  font-style: normal;
}

Step 4.
Move font-awesome.css to your assets/stylesheets directory and restart the rails server.
Done!