Skip to content

Instantly share code, notes, and snippets.

@leoallen85
Last active December 14, 2015 19:18
Show Gist options
  • Save leoallen85/5135326 to your computer and use it in GitHub Desktop.
Save leoallen85/5135326 to your computer and use it in GitHub Desktop.

Sublime Text 2

Although you're free to use any editor we recommend Sublime. Here's how to get the most out of it

Setting up

Once you've installed Sublime there's a few things you should do to get things set up properly

Package Control

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

Sublime from the terminal

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.

Update your settings

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

Get Ruby build working

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment