Skip to content

Bootstrapping on OS X

Marshall Rose edited this page Jan 31, 2014 · 15 revisions

Here's how to get the steward running on Mac OS X 10.8 (Mountain Lion).

First, make sure that /usr/local/bin is before /usr/bin in your $PATH.

Second, make sure you have Xcode installed on your system, and after starting Xcode go to the "Preferences/Downloads" window and install the Command Line Tools.

Second, get homebrew on the system:

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
$ brew doctor

If homebrew suggests anything, e.g.,

brew install git
brew upgrade git

...and so on...

please do so. Keep doing this until you get

brew doctor
Your system is ready to brew.

Then install the USB compatibility library

brew install libusb-compat

Then, put the node version manager (nvm) on the system:

git clone git://github.com/creationix/nvm.git ~/.nvm
echo ". ~/.nvm/nvm.sh" >> ~/.bashrc  
. ~/.nvm/nvm.sh

Then install the v0.10.22 release of node.js on the system:

nvm install v0.10.22
nvm alias default v0.10.22

(This isn't the most current version, but all the dependencies work with it...)

Then go to the steward directory and install the libraries:

cd steward/steward
npm install -l

Note that the top-level directory may be called steward-master, in that case you want to:

cd steward-master/steward
npm install -l

instead.

Alternative method to install Node.js

The nvm system is based around the bash shell. If you run tcsh or another alternative, it's not going to work for you. You'll have to install node by hand. Go ahead and checkout Node.js from the Github repository,

git clone https://github.com/joyent/node.git

change directory and switch to v0.10.22 release.

cd node
git checkout v0.10.22 -b v0.10.22

Now go ahead and build,

./configure
make
sudo make install

before proceeding as normal.

##Installing the Steward

Check out the steward from its Git repository,

git clone https://github.com/TheThingSystem/steward.git
cd steward/steward

Delete the node_modules directory if it exists, as the depending on the last build these may be for OS X, and go ahead and install the libraries,

rm -rf node_modules
npm install -l

This will take a while. Go make coffee.

If you have problems building the steward

If you have problems at the npm install stage when building the steward, you should clean up your environment and try again,

rm -rf node_modules
npm cache clean
rm -rf ~/.npm/_git-remotes
git pull upstream master

And if that fails, also try:

rm -rf ~/.node-gyp
rm -rf ~/.npm
rm -rf ~/.nvm
rm -rf ~/.npmrc

and then go back to the

npm install -l

##Running the steward

Once you have the steward installed, you should follow these instructions to start it.

Analytics