First Things after Clean Install of Yosemite

These are mostly notes to myself. The goal is to set up a basic Ruby on Rails development environment on MacOSX Yosemite.

1. Install Homebrew:

[Homebrew did this automatically, but just in case: install Command Line Tools:
xcode-select --install ]

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

update PATH:

echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile

ensure it’s working:
brew doctor

2. Update tools:

# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils

# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils

# Install Bash 4
brew install bash

To use this version of bash, you’ll need to change your account’s login shell in System Preferences -> Users & Groups. Right-click on username, select Advanced Options, and change shell to /usr/local/bin/bash. Then restart Terminal.app.

# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep

3. Setup Git and Github:

brew install git

configure Git:

git config --global user.name "name"
git config --global user.email "my email"

setup SSH key for Github:
cd ~/.ssh
ssh-keygen -t rsa -C "github email"
pbcopy < ~/.ssh/id_rsa.pub

in Github, paste into Settings/SSH Keys.

test that it works:
ssh -T git@github.com

4. Gonna need:
brew install wget
brew install coreutils

5. Install Emacs:
brew install emacs --HEAD --use-git-head --cocoa --with-gnutls --with-rsvg --with-imagemagick
brew linkapps

6. Install rbenv and Ruby

brew install rbenv ruby-build

add rbenv to .bash_profile:

echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile

check for most recent Ruby:

rbenv install -l

install Ruby:

rbenv install version-number

set this version of Ruby as default:

rbenv global version-number
ruby -v

7. Install Rails

gem install rails
rbenv rehash
rails -v

References:

General:

Git/Github:  Beginner’s Setup Guide for Ruby, Node.js, Git, Github, and other things on Mac OS X 10.9

Emacs:  StackOverflow discussion on Mac versions of emacs

Ruby, Rails, rbenv: Setup Ruby on Rails on MacOSX 10.10 Yosemite

This entry was posted in local.config. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *