command-Space
. Once Spotlight is up, just start typing the first few letters of the app you are looking for, and once it appears, select it, and press return
to launch it. See the animated GIF below for an example:return
key on your keyboard:Install
when it appears.Agree
when the License Agreement appears:Done
. That's it! You're now ready to go to Step 2.return
, then follow the instructions when prompted, as highlighted in the screenshot below. Note that Terminal does not provide visual feedback when you type your password. Just type it slowly and press return.Your system is ready to brew
, you can move on to Step 3. Otherwise, go to the Troubleshooting section to learn how to fix errors and warnings you might run into.brew update
, but it's a good habit to run it before installing anything with Homebrew because Homebrew is updated regularly.git version 2.20.1
or later.brew doctor
to make sure everything is still working. If your system is ready to brew, you can move on to Step 4.Sign Up at GitHub.com
link in the app, then come back to the app to complete the setup. I highly recommend that you turn on two-factor authentication for your GitHub account.Continue
Sign In
Continue
Continue
Done
--rails
with --ruby
in the command below:rvm is a function
, that means RVM was successfully installed. If not, go to the Troubleshooting section.rvm 1.26.10
or higher.ruby 2.2.0
or higher. If you get dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
, that means something is wrong with the binary version of the latest Ruby. To fix it, reinstall your desired Ruby version by disabling the binary:rails -v
You should get Rails 4.2.0
or higher.brew doctor
If everything went well, you're done! Your machine is now set up with the basic tools for web development.brew update
and brew doctor
to make sure your system is still ready to brew. To upgrade your existing packages, run brew upgrade
.brew doctor
until you get Your system is ready to brew
. Then go to Step 3.Warning: /usr/bin occurs before /usr/local/bin
, run the command below (as recommended by Homebrew), and quit and relaunch Terminal:>>
) to a file called .bash_profile
in your user's root directory (~/
). Every time you open a new Terminal window or tab, .bash_profile
is called. The export PATH
line tells your system to look in /usr/local/bin
first, since that's where Homebrew installs tools.Warning: Experimental support for using Xcode without the 'Command Line Tools'
, you probably upgraded from Lion to Mountain Lion but didn't reinstall the Command Line Tools. See the important note in Step 1.Error: No such file or directory - /usr/local/Cellar
, run the following command, which creates the /usr/local/Cellar
directory:sudo
allows you to run commands as a user with higher access rights, which is why it prompts you for your password, and mkdir
stands for 'make directory.'/usr/local/etc isn't writable
or Cannot write to /usr/local/Cellar
or if it complains that any directories inside /usr/local
aren't writable, fix it with this command:/usr/local
directory, in addition to all nested directories.chown
stands for 'change owner,' the -R
flag applies this to all nested files and directories, and whoami
is a variable that represents your OS X username. You should copy and paste the command above as is.man
(for 'manual'), followed by the command. For example::
at the end to signify there is more to read. To display one additional line at a time, press return. To display an additional page at a time, press the space bar. To quit at any time, press q
.Warning: Unbrewed dylibs were found in /usr/local/lib
, or a warning about any type of unbrewed files or static libraries, you may need to delete them as suggested by Homebrew (unless you put them there on purpose, which is unlikely). You'll have to delete each file it complains about one by one with the rm
command. For example, to remove a file called libgd.2.0.0.dylib
from /usr/local/lib
, you would run this command:Warning: Python is installed at /Library/Frameworks/Python.framework
, or Warning: 'config' scripts exist outside your system or Homebrew directories
related to Python, it most likely means you installed Python with a tool other than Homebrew. If you think you might need this version of Python, then just ignore those warnings. Otherwise, run the command below to remove that version of Python, but read this thread first.brew doctor
to verify. Your system should be ready to brew now.brew doctor
might show you this warning:brew unlink
, followed by the tools (or 'brews') that need to be unlinked. Here, there is only one tool that needs to be unlinked. Therefore, you should run this command:brew doctor
once more, and you should be ready to brew
now.gpg
installed (which won't be the case on a new Mac), you will get a GPG signature verification failed
error. Make sure to follow the instructions in the error message. At the time of this writing, you will need to run the command below to download the signatures, after which you can go back to step 5 to install RVM..bash_profile
has been modified, it needs to be reloaded. For initial RVM installations, the preferred way to do this is to quit and relaunch Terminal. Otherwise, you can use the following command:rvm is a function
after you run this command:rvm requirements
used to provide instructions specific to your environment, but now it tries to install all the requirements for you.rvm requirements
would show. One is for Snow Leopard 10.6.8 with Xcode 4.2, and the other for Mountain Lion 10.8 with no Xcode:brew update
before installing anything with Homebrew.