-
Notifications
You must be signed in to change notification settings - Fork 9
Mac OS X Setup Guide
These are the steps I took to setup a heliotrope development environment on a MacBook Pro (Retina, 13-inch, Early 2015) running OS X El Capitan (Version 10.11.6) in August of 2016.
This guide assumes you have Admin privileges on your MacBook Pro and no development tools installed. For detail instructions on how to setup each individual tool I'll refer you to Sourabh Bajaj who wrote an excellent open source book Mac OS X Setup Guide that gives step by step instructions on setting up a developer environment on Mac OS.
Disclaimer: There are more ways than one to skin a cat, so are there more ways than one to setup your development environment? I have no interest in promoting one tool over another these are simply the tools I chose and the steps I took. Feel free to substitute equivalent tools of your choice as you deem necessary.
Note: You could install Homebrew (or MacPorts) first and then use it to install everything else to manage multiple versions of all your tools!
I already had Xcode installed but in the past I've installed from the App Store. Sourabh installs Xcode from the command line then immediately installs the Xcode command line tools.
When I attempted to use Git for the first time from the command line I was walked through installing the Xcode command line tools which includes Git. Sourabh uses Homebrew to install Git.
To install Homebrew I just cut and pasted the command as per instructions on the website. Sourabh seems to have done the same thing.
The first thing I did was install jenv using Homebrew which is a lot like rbenv. Once jenv was installed I used the $ jenv add
command to get the latest version of Java from Oracle. Sourabh directly installs Java from Oracle.
The first thing I did was install rbenv using Homebrew.
$ brew update
$ brew install rbenv ruby-build rbenv-default-gems
Then I installed a version of ruby using rbenv.
# list all available versions:
$ rbenv install -l
# install a Ruby version:
$ rbenv install <ruby-version>
After making the newly installed ruby my active ruby I installed the bundler gem.
# set active ruby version:
$ rbenv global <ruby-version>
# install bundler gem:
$ gem install bundler
Sourabh installs a few other things as well, including rails.
I followed the instructions in the Heliotrope README.md which failed on the bundle install step. I then manually translated the steps inside of bootstrap.sh, ignoring the cd /vagrant, to the following Homebrew commands:
$ brew update
$ brew install mysql
$ brew install clamav
I attempted a bundle install for a second time and it still failed. After some googling I came across this http://patshaughnessy.net/2011/10/31/dont-be-terrified-of-building-native-extensions and this http://bundler.io/v1.12/man/bundle-config.1.html which I translate to:
$ brew install openssl
$ bundle config build.clamav --with-opt-include=/usr/local/Cellar/openssl/1.0.2h_1/include
(Moses notes: I had a similar issue and solved it with a slightly different incantation due to different Homebrew setup or version. Also, it is worth noting here that ClamAV is an open-source malware detector that contains malware signatures that may cause other antivirus software like SCEP running on your development machine to freak out.)
bundle config build.clamav --with-opt-include=/usr/local/opt/openssl/include/ --with-clamav-include=/usr/local/include/
My third attempt at
$ bundle install
was successful and the rest, as they say, is history...