Skip to content

Instantly share code, notes, and snippets.

@kellyredding
Created September 13, 2012 19:57
Show Gist options
  • Save kellyredding/3717150 to your computer and use it in GitHub Desktop.
Save kellyredding/3717150 to your computer and use it in GitHub Desktop.
Moving to rbfu

Rbfu

I decided to switch to Rbfu (https://github.com/hmans/rbfu) for my ruby version manager. These are the rough steps I did to make that change.

Install rbfu

I just followed the READMEs manual install instructions: https://github.com/hmans/rbfu#manual-installation

install rubies with ruby-build

Simple homebrew install/upgrade: https://github.com/sstephenson/ruby-build#installing-with-homebrew-for-os-x-users

First lets see what the latest definitions are:

$ ruby-build --definitions

I want the latest REE 1.8.7. Install it where rbfu expects it:

$ ruby-build ree-1.8.7-2012.02 ~/.rbfu/rubies/ree-1.8.7-2012.02

Repeat for any other rubies you want.

Set up the default rubie

I added eval "$(rbfu --init --auto)" to my bash profile so all I had to do was add a `.ruby-version file in my $HOME dir:

$ echo "ree-1.8.7-2012.02" > ~/.ruby-version

Reload my shell and verify:

Activated Ruby ree-1.8.7-2012.02. (from /Users/kelly/.ruby-version)
$ ruby -v
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [i686-darwin11.4.0], MBARI 0x6770, Ruby Enterprise Edition 2012.02

Why?

Rbfu is very minimal - just set 3 env vars. I like that. Plus I was seeing slow downs in launching new shells with rbenv (may have been just something about my setup). Rbfu does just what I want and nothing more.

Note

If you have any whitespace in your $PATH (ie /Applications/Sublime Text 2.app/Contents/SharedSupport/bin), you may need to check out this pull request: hmans/rbfu#26

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