![]() No navigating to the web site, no downloads, no mounting installers. Next, let's try our first install: $ brew cask install google-chromeĪnd just like that, you have Google Chrome installed. ![]() Recipes that are for GUI apps are called casks.įirst, let's install cask: $ brew install caskroom/cask/brew-cask But the homebrew-cask project allows you to manage GUI apps-that is, apps with a graphical interface like Chrome and Skype-via Homebrew as well. Up until recently, Homebrew only installed command-line programs. Now, once I've installed Homebrew, I can just navigate to the directory with my Brewfile and run brew bundle. # Matt Stauffer's awesome BrewfileĪs you can tell, Homebrew just runs each line as if you had run brew tap josegonzalez/php, brew tap homebrew/dupes, brew install openssl, etc., one after another. I hope to update it very soon (would love help if you want to translate it into modern brewfile-ese for me) but if you're following this, check out the GitHub README for instructions for how it works these days. NOTE: This entire section is now a bit out-of-date. We'll end up with a file looking something like this: Thoughtbot has written a great article entitled Brewfile: a Gemfile, but for Homebrew that will give you all the details you need. Of course, since we're talking about automating here, I prefer the Brewfile option. This way you can install packages that aren't a part of the core Homebrew list of available recipes. Note: if you ever see brew tap repo_name_here, it's helpful to know that the tap command allows you to add Github repositories to your list of installable Homebrew packages. I hope to update this post soon, but for now look here: github/homebrew-bundleĪ Brewfile is just a text file listing out all of the commands you'd like Homebrew to run in order, one command for each line. NOTE: The syntax and tooling for Brewfiles have changed. So, Homebrew folks created a Brewfile, which is like a Gemfile (or composer.json, or package.json). However, it's still pretty awkward and manual to paste in a massive list of packages to install using this method. The classic way of installing a package using Homebrew is to just pass the package (recipe) name as a parameter to the command line app: $ brew install package_name_here To install a package with Homebrew, you can do one of two things. You can visit the Homebrew home page to learn more, or just run the following command to install Homebrew: $ ruby -e "$(curl -fsSL )" Thankfully, recent versions of OS X have started auto-prompting you to download it when you try to do anything relatively complex from the command line, so I'm not going to attempt to provide instructions for that here. NOTE: Before you install Homebrew, you'll need the latest version of the Xcode command line tools. Almost any app you've ever installed and used from the Mac command line-php, mysql, optipng, etc.-can likely be installed and managed via Homebrew. ![]() Homebrew is a package manager like Composer, NPM, or RubyGems, but the apps it installs are OS X system-wide command-line (and, with the addition of cask, system-wide GUI) apps for the Mac. If you're a NodeJS developer, you'll probably want to look there.) Homebrew Thankfully, Node's installer packages are extremely easy to use: Install Node (Note: there is a Node Version Manager, if you need to be able to swap out versions of Node. You technically can install these with package managers like Homebrew, but I've heard that NPM and Homebrew often battle each other and that it's worth installing it separately. If you're working with Node-even if it's just for Gulp or Grunt-you already know that you need Node & NPM. Learn more about how to handle your Ruby versions at RVM's site: RVM basics Install NPM (Node Package Manager) & Node Now you have convenient command-line methods to install, manage, and switch to Ruby versions easily. Install RVM: $ \curl -sSL | bash -s stable -ruby Either way, a Ruby version manager will make it easy to install, manage, and switch between multiple versions of Ruby on the same system. The old standby, which I'm most familiar with, is RVM, but of you're familiar with Rbenv that'll do fine as well. If you're working with Ruby-even if it's just for Sass and Compass-you absolutely want to use a version manager. Package managers are the best way to simplify the installation process, because they require minimal work from the user's perspective and provide greater flexibility, consistency, and automation of the install process than installing apps manually. ![]() Next we'll set up global package managers to manage our system-level (and app-level) dependencies, including installing most of our command-line and GUI apps. In the last post, we synced down our core configuration files and customized our terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |