Ceejbot

Tag Results

3 posts tagged ruby

How to do Ruby development on your OS X box without going mad: the terse guide, mark 2.

Sick of rvm? Yeah, everybody else is too.

One. As before, install homebrew and pow

/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
curl get.pow.cx | sh

Two. Install rbenv and some supporting tools.

brew install rbenv rbenv-gemset ruby-build

If you have previously installed rvm, remove its setup from your profile. Replace it with this line:

eval "$(rbenv init -)"

Source the file.

Three. Build a ruby and set it up for use with rbenv:

rbenv install 1.9.2-p290

Four. Tell rbenv to use whatever you just installed as a default:

rbenv global 1.9.2-p290

Five. Install gems as needed.

gem install bundler
rbenv rehash
which bundle
bundle install

Six. Optionally, use rbenv-bundler to make rbenv create shims for bundler-installed gems.

How to do Ruby web app development on your OS X box without going mad: the terse guide.

One. Install the homebrew package manager. You might have to nuke fink or darwinports first. Do not hesitate. Make the switch.
ruby -e “$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)”

Two. Use brew to install git.
brew install git

Three. Install rvm, the ruby version manager.
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

Four. Follow the rvm instructions for getting its environment injected into your shell. This is the hardest step of all. No, really.

Five. Install a recent ruby. To live dangerously:
rvm install ruby-head Snag whatever gems you need in your new ruby enviroment.

Six. Install Pow:
curl get.pow.cx | sh. Symlink your app directories into ~/.pow.

Seven. In each app directory, create a file called .rvmrc and put into it a line that directs Pow to use the ruby of your choice:
rvm ruby-head.

Eight. Visit http://appname.dev/ in your browser. Observe that you are now cooking with gas.

As far as I can tell, you’ll regret not doing it this way.