41
ZSH & RVM Pat Allan @pat http://freelancing-gods.com

ZSH and RVM

Embed Size (px)

DESCRIPTION

A quick introduction to ZSH and RVM, and how to get them playing nicely with TextMate, Rails 3 and RSpec 2 on a Mac. Note that the shortcuts listed are just in my fork of Oh-My-ZSH, not the original. And these slides are kinda lacking when there's no audio - that may appear later.

Citation preview

Page 1: ZSH and RVM

ZSH & RVMPat Allan @pathttp://freelancing-gods.com

Page 3: ZSH and RVM

Z Shell

Page 4: ZSH and RVM

Very similar to Bash

Page 5: ZSH and RVM

Sorry Windows Users

Page 8: ZSH and RVM

g = git status

Page 9: ZSH and RVM

l = git log

Page 10: ZSH and RVM

d = git diff

Page 11: ZSH and RVM

gco = git checkout

Page 12: ZSH and RVM

gcom = git checkout master

Page 13: ZSH and RVM

hp = git push heroku master

Page 14: ZSH and RVM

hc = heroku console

Page 15: ZSH and RVM

sc = script/console

Page 16: ZSH and RVM

ss = script/server

Page 17: ZSH and RVM

gen = script/generate

Page 18: ZSH and RVM

tm = TextMate...

Page 19: ZSH and RVM

# In ~/.zshrc

export ZSH=$HOME/.oh-my-zshexport EDITOR=mateexport ZSH_THEME="pat"

plugins=(git heroku osx rails ruby textmate)

source $ZSH/oh-my-zsh.sh

source ~/.rvm/scripts/rvmrvm use 1.8.7 &> /dev/null

Page 20: ZSH and RVM

RVMrvm.beginrescueend.com

Page 21: ZSH and RVM

Ruby Version Manager

Page 22: ZSH and RVM

Built for Bash

Page 23: ZSH and RVM

Works with ZSH

Page 24: ZSH and RVM

Install Multiple Rubies

Page 25: ZSH and RVM

MRI 1.8.7

Page 26: ZSH and RVM

MRI 1.9.x

Page 27: ZSH and RVM

JRuby

Page 28: ZSH and RVM

REE

Page 29: ZSH and RVM

+ more

Page 30: ZSH and RVM

Even better: Gemsets

Page 31: ZSH and RVM

... but with TextMate?

Page 32: ZSH and RVM

⌘R

Page 33: ZSH and RVM

.rvmrc

Page 34: ZSH and RVM

rvm use 1.8.7@rails3

Page 35: ZSH and RVM

TM_RUBY

Page 36: ZSH and RVM
Page 37: ZSH and RVM

#!/usr/bin/env zshsource ~/.rvm/scripts/rvm

if [[ -s "${TM_PROJECT_DIRECTORY}/.rvmrc" ]]then source "${TM_PROJECT_DIRECTORY}/.rvmrc"fi

`which ruby` $*

Page 39: ZSH and RVM

Rails 3 and RSpec?

Page 41: ZSH and RVM

Questions?