layout | title | permalink | toc | category | order |
---|---|---|---|---|---|
guides |
Instructions for Mac |
set-up-your-development-environment-mac |
true |
Before the Day of Code |
4 |
Instructions for Mac set up. If you are on Windows, ignore this article and proceed to the next one.
Check the version of your operating system by click the Apple menu and choosing "About this Mac".
If your version is 10.6 or higher, this guide is for you. If it’s lower, email us urgently, well before the Day of Code.
If your version is 10.9 or higher, do the following:
Open Terminal (Mac) or the Command Prompt (Windows), and, at the command line, paste the following and press enter:
{% highlight bash %} xcode-select --install {% endhighlight%}
At the command line, paste the following and press enter: {% highlight bash %} ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" {% endhighlight%}
Git should be installed as part of XCode, but it's best to check. At the command line, type the following and press enter: {% highlight bash %} git --version {% endhighlight%}
You should see something like: {% highlight bash %} git version xx.xx.xx (Apple Git-xx) {% endhighlight%}
If you don't, download the latest Git for Mac installer and follow the prompts to install Git.
At the command line, paste the following and press enter: {% highlight bash %} brew update brew install rbenv echo 'eval "$(rbenv init -)"' >> ~/.bash_profile source ~/.bash_profile {% endhighlight%}
At the command line, paste the following and press enter: {% highlight bash %} rbenv install 2.5.5 {% endhighlight%}
If you get an OpenSSL::SSL::SSLError: … : certificate verify failed
error,
paste the following and press enter:
{% highlight bash %}
brew install curl-ca-bundle
{% endhighlight%}
And then also paste the following and press enter.
{% highlight bash %}
cp /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'
{% endhighlight%}
At the command line, paste the following and press enter: {% highlight bash %} rbenv global 2.5.5 {% endhighlight%}
You do not need Rails for the Day of Code, but if you'd think you'd like to have it on your laptop for continuing your learning after the event, do the following. At the command line, paste the following and press enter: {% highlight bash %} gem install rails --no-document {% endhighlight%}
If your MacOS version is 10.6, 10.7, or 10.8, download the RailsInstaller for your version of OS X:
RailsInstaller for 10.7 and 10.8 (325MB)
RailsInstaller for 10.6 (224MB)
Double click the downloaded file and it will unpack it into the current directory. Double click the the newly unpacked RailsInstaller-1.0.4-osx-10.7.app or RailsInstaller-1.0.4-osx-10.6.app and follow the instructions. It will open a README file with Rails Installer OS X at the top. Please ignore the instructions in this file.
At the command line, paste the following and press enter: {% highlight bash %} ruby -v {% endhighlight%} You should get something like this appear:
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin17]
Please email us if you don't.
- You have installed the tools needed to develop software on your computer.