Skip to content

Instantly share code, notes, and snippets.

@kylestetz
Last active December 30, 2015 03:39
Show Gist options
  • Save kylestetz/7771127 to your computer and use it in GitHub Desktop.
Save kylestetz/7771127 to your computer and use it in GitHub Desktop.
Homebrew Apostrophe Install for Minimalists

Homebrew Apostrophe Install for Minimalists

This is the minimum necessary to get an apostrophe project up and running in OS X Mavericks. This was tested on a new MBP with no software on it. Here's what this covers:

  • Homebrew (for easy installing)
  • Git
  • Node (& npm)
  • Mongo
  • Imagemagick (for image manipulation- required by Apostrophe)

You should install Xcode before going through this process. Homebrew may ask you to install the Xcode Command Line Tools, which can be installed by going to Xcode -> Preferences ... -> Downloads.

Open a terminal window. Anything formatted like this is meant to be run in a terminal prompt.

Install Homebrew

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

Node & NPM

brew install node

We'll need to add node's directory to our $PATH in order for it to work its magic. Create a bash profile if you don't have one already, and then open it in TextEdit: touch ~/.profile && open ~/.profile

In this new file, add these two lines:

export NODE_PATH="/usr/local/lib/node"
export PATH="/usr/local/share/npm/bin:$PATH

You should verify that this worked by opening a new Terminal tab and running: echo $PATH

It should echo the path that you added as a set of colon-separated values.

NPM may or may not have been installed with Node. Try: npm

and if you get a 'not found' kind of error, run this: curl https://npmjs.org/install.sh | sh

Git

brew install git

Mongo

brew install mongo

During the mongo install, it will print out instructions for starting mongo on login (recommended for developers), which should look like this:

==> Caveats
To have launchd start mongodb at login:
    ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
Then to load mongodb now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Or, if you don't want/need launchctl, you can just run:
    mongod

Run those, open a new tab and try: mongo

It should start an interactive mongo prompt. ctrl+c to exit.

ImageMagick

brew install imagemagick

Done!

@native-apps
Copy link

Is it possible to install Apostrophe without Mavericks? Still running 10.6.8, trying to keep resources as free as possible.

@boutell
Copy link

boutell commented Mar 21, 2014

We used Mavericks and didn't want to swear on a stack of bibles that it would work in another release, but homebrew works with some older releases I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment