Setup and Installation

This guide and the rest of the book as a whole is going to assume you use Mac or a Debain Linux type of environment (a.k.a. Ubuntu).

Installing Ruby

Installation with Ruby is easier than ever with Mac - it’s already included:

$ ruby -v
> ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-darwin17]

For this book, I’ll be using Ruby 2.4.3. You’re welcome to use another version if you’d like. There’s not wildly different constructs from version to version. But if you’d like to avoid any potential headaches, please try sticking with 2.4.3.

However, if you don’t have Ruby pre-installed for some freak reason or if you have an older version of Ruby installed you have 2 options:

h4. Installing with your OS Package Manager

For Mac, homebrew is the de facto package manager. Regardless if you want to install Ruby with it specifically I highly recommend using this tool to install developer packages in general.

For Ubuntu, simply run:

$ sudo apt-get update && apt-get install -y ruby

Installing PHP

This book is tailored for PHP developers trying to learn Ruby. If you don’t know how to install PHP, I suggest that you learn PHP first before embarking on this here quest. No offense.