As I’ve written last week, I’ve been starting to play around with Ghost and to do so I had to go through an extensive maintenance of my MacBook. But that also gave me the opportunity to revamp it installing the tools needed for a modern web development workstation. In this post I won’t focus that much on the Ghost installation part as it’s well explained on Scott Hanselman post about installing Ghost on Azure, but I’ll focus more on installing the tools needed using the best practices.

Tools needed

Basically you’d need to install the following tools:

  • Git
  • Node.js
  • Ruby

Git

Git is a prerequisite for installing most of the other tools, as nowadays most automatic installation processes for opensource tools go fetch the code directly from the git repository and build them. So we are going to install it first. You might already have it installed: if unsure just type git --version. If you don’t get anything you have to install it, downloading from http://git-scm.com/download/mac. Once installed you can open a terminal window and type again git --version. You should get something like:

git version 1.8.4.2

This means it’s been installed correctly and, at the time of writing, you are running on the latest available version.

Node.js tools

Ghost is a Node.js application, so you obviously need to install Node.js. But to make life easier in case you want to work with it for other projects you should also install NVM (a node version manager) which makes switching between versions very easy.

NVM

To install it just type this line on terminal window:

sudo curl https://raw.github.com/creationix/nvm/master/install.sh | sh
Node.js

Once NVM is installed you can download and install the latest version of nodejs by typing nvm install 0.10 to download the latest latest available 0.10.x release.

Grunt

Needed for building your own Ghost, but also very useful if you do JavaScript development,Grunt is a task runner that can automate almost everything: for .NET developers, it’s like MsBuild or NAnt… just running on Node.js. To install it type, and you’re good to go.

sudo npm install grunt-cli --g 

Remember the sudo as otherwise the installation will fail.

Ruby

Even if you are not going to work with Ruby, installing it is a good idea as many web developer tools, like Sass, require Ruby.

Like we did for Node.js with NVM, we are going to install Ruby via a version manager, called RVM.

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

The line above will install RVM, downloading it from source, and once done will automatically download the latest stable version of Ruby.

Sass and Bourbon

In addition you’ll also have to install Bourbon (which brings Sass as dependency): gem install bourbon will do the trick.

Installing Ghost

Now that you have all the tools needed for building Ghost (or any other modern Node.js application) you can go on and install it locally. Just type in the following lines in the terminal window.

git clone https://github.com/TryGhost/Ghost.git
npm install
grunt init
grunt prod

Running Ghost

At this point you have a local version of Ghost: next step is have it up and running: npm start and then point your browser to http://127.0.0.1:2368

Running Ghost on Azure

Now that you have Ghost running locally, you can install it on Azure… just follow the last part of Scott Hanselman step by step guide and you’ll get your blog up and running in no time.