Although you're free to use any editor we recommend Sublime. Here's how to get the most out of it
Once you've installed Sublime there's a few things you should do to get things set up properly
Adding package control allows you to install any of hundreds of free sublime plugins. We'll be using some of these throughout the course, so best to get this installed now, using these instructions
You can launch Sublime from the terminal by typing subl
, but first run this command in your terminal
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl`
You'll need to type in the password you use to login.
There's a few settings I'd advise tweaking to get your editor set up for coding Ruby. Go to the top menu and open Sublime Text 2 > Preferences > Settings - User. Replace the contents of the file with this file. The comments in the file explain why I've set everything as it is
To run Ruby files from sublime you can press ⌘ + B
, but it won't work properly with rvm. To fix this, enter in the terminal
subl ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Ruby.sublime-build
then copy this file in to Sublime Text and hit save.