/dev/rantom

line noise

Local Ruby Installation on FreeBSD

Modernish ruby and isolated gems to prevent dependancy hell. Or avoid it mostly.

ruby-build

https://github.com/sstephenson/ruby-build

1
2
3
git clone git://github.com/sstephenson/ruby-build.git
cd ruby-build
PREFIX=$HOME/local ./install.sh

After that you need to manipulate your path.

1
PATH=$HOME/local/bin:$PATH

Installation

1
MAKE=gmake ruby-build 1.9.3-p392 $HOME/.rubies/1.9.3-p392

Note

ruby-build needs the MAKE=gmake environment variable set

Dependancies

1
pkg_add -r libyaml

chruby

https://github.com/postmodern/chruby

1
2
3
4
fetch -o chruby-0.3.4.tar.gz https://github.com/postmodern/chruby/archive/v0.3.4.tar.gz
tar -xzf chruby-0.3.4.tar.gz
cd chruby-0.3.4/
PREFIX=$HOME/local make install

Configure shell to use it

1
source $HOME/local/share/chruby/chruby.sh

Switch to the new ruby

1
chruby 1.9.3-p392

Bundler

1
gem install bundler

Comments