Skip to content

Instantly share code, notes, and snippets.

@stephenmckinney
Last active December 10, 2015 16:19
Show Gist options
  • Save stephenmckinney/4460327 to your computer and use it in GitHub Desktop.
Save stephenmckinney/4460327 to your computer and use it in GitHub Desktop.
Moving from RVM to rbenv with prezto on Mac OS X Mountain Lion

Uninstall RVM

rvm implode

Then remove any reference to RVM in .z* files.

Install rbenv

brew update
brew install rbenv
brew install ruby-build

NOTE: eval "$(rbenv init -)" is handled by prezto

Install rubies

rbenv install 1.9.3-p327
rbenv global 1.9.3-p327
CPPFLAGS=-I/opt/X11/include CC=/usr/local/bin/gcc-4.2 rbenv install ree-1.8.7-2012.02

Fix zsh prompt in prezto

Use $ruby_info. See prezto docs

Install ur fave gems

gem install bundler rails pry pry-doc pry-nav \
awesome_print tmuxinator pomo \
pasteboard imgur2 cloudapp_api

Set global ~/.bundle/config

Go to some project and:

bundle isntall
bundle install --binstubs=.bundle/binstubs

Then:

mkdir ~/.bundle
cp .bundle/config ~/.bundle/config
rm -rf .bundle/config

Clean out old .bundle/config from each project

find . -type f -name config -print | xargs grep -H 'BUNDLE'

Clean out custom git excludes of old binstubs from each project (my old hack)

find . -type f -name exclude -print | xargs grep -H 'bin'

Add .bundle/binstubs to $PATH

echo "PATH=.bundle/binstubs:$PATH" >> ~/.zshrc

Yes, I know it's a security hazard.

Go install some gems

bundle all up in your projects

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