Skip to content

A friendly introduction to rake, dependency programming, and being more productive.

Notifications You must be signed in to change notification settings

jordandm/rake_getting_started

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started with Rake

A friendly introduction to rake, dependency programming, and being more productive.

The goal of this 'class' is to introduce you step-by-step to rake and how to use it and dependency programming to be more productive, while writing code that is easy to understand and maintain.

Prerequisites

In order to take advantage of this introduction to rake, you will need to have your environment setup properly. You will need to have a current generation Ruby installed. This means if you are on Mac OS X, you will not be using the default Ruby install.

To help you in managing your Ruby environemnt, we will introduce you to rbenv, which will help you to create a sandbox environment in which to work, without polluting your standard environment.

My instructions below assume that you are on Mac OS X. If you are running on Linux or Windows, you will have to adapt them as required.

Clone me!

First off, clone this repo and cd to it. This will get you setup and ready to roll.

brew

As part of this process, you will need to install various packages that will need to be built from source. To ease that process for you, I recommend that you install the Mac OS X package manager, HomeBrew.

Installing HomeBrew (or brew as its friends call it) is trivially easy. Fire up your terminal of choice, paste the line below, and run it.

    $ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

The brew script will explain what it does and give you the opportunity to bail out if you so choose.

Important Point!

Run this command - and all others I ask you to run - as a local user, not root. Trust me that in the long run it iwll make your life easier. There are places and times to run these commands as root, but this is not one of them.

rbenv

Now that we have brew installed, it is time to install rbenv, a Ruby environment manager that will allow you to create a 'sandbox' in which to experiment without polluting the rest of your system.

Because we have brew installed, installing rbenv and its associated components as almost as trivally easy as installing brew.

Just open up your terminal - maybe you left it open from installing brew and type:

    $ brew update
        - This will bring _brew_ up to date and make sure you have the latest 'formulas' (_brew-speak_ for package          
        definitions) in hand.
        
    $ brew install rbenv
        - Install _rbenv_ for you
        
    $ brew install ruby-build
        - Install the ruby-build tools you will need.

Now you need to add a little magic to your .bashrc or .bash_profile, just pop up your favorite editor and add the following eval "$(rbenv init -)" at the end of it. Once you have done this, source it, to make sure these changes take effect:

    $ source .bashrc

Now we need to add a few 'accessories' to rbenv to make it easier to use:

    $ brew install rbenv-gem-rehash
    $ brew install rbenv-gemset
    $ brew install rbenv-bundler

And then let's get our first Ruby installed:

    $ rbenv install 1.9.3-p194
    $ cd ..
       - We need to move into and out of the directory to get some needed rbenv and  rbenv-gemset functionality working.
    $ cd -
        - This takes you back to your previous working directory

Amd start installing our needed Ruby gems:

    $ gem update --system
        - Make sure we have the latest and greatest Ruby gems installed
    $ gem install rake bundler

Whew! You still with us? Hope so, because we are now ready to rock and start learning about rake!

About

A friendly introduction to rake, dependency programming, and being more productive.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published