Skip to content

Install

Doc Ritezel edited this page Jan 4, 2013 · 9 revisions

Simple Installation

This article assumes you are using OSX, that you've seen the command line before and that you have a Rails app already.

If you're new to the command line, consult the Terminal.app guide.

If you need to make a new Rails application, consult the Rails app guide.

This article assumes your application is at ~/workspace/client-app. Substitute your actual application accordingly.

Why Sublime Text?

A good text editor is all you need to navigate a basic Rails app. Sublime Text happens to be the finest text editor currently on the market.

Adding the Style Guide Gem

We need to add the Style Guide to our list of dependencies. Bundler keeps that information in a file called Gemfile. First, we need to open Sublime Text.

Next, open the ~/workspace/client-app directory.

Then, open Gemfile.

Let's modify Gemfile to say that we depend on Style Guide by adding the line gem "style-guide".

Installing Dependencies

We now need to get Bundler to install all of the dependencies for Style Guide. We can do this on the command line. First, open a Terminal window and go into the ~/workspace/client-app directory.

Next, we need to pull all of our dependencies in by running bundle install.

You should see the style-guide gem show up in the installation text.

Running the Install Generator

Style Guide includes a convenient Rails-only installation mechanism: the install generator. We can do all the complicated setup in one command: rails g style_guide:install.

Viewing the Style Guide

We're ready to run Rails again with rails server.

You can visit Style Guide at http://localhost:3000/style-guide.

Running Guard

A major part of using Style Guide is Guard, which watches your Rails app for changes. Let's open another Terminal tab using Command+T and go into the ~/workspace/client-app directory.

When Guard runs, it wants to know all about where our dependencies are located. We can make sure this happens by running bundle exec guard.

Clone this wiki locally