Apr
29

Compile Psych support in Ruby 1.9.2p180

Posted in : rvm, ruby, 1.9.2, homebrew, and yaml

Ruby 1.9.2 comes with a new YAML parser: Psych from Aaron Patterson (aka Tenderlove).
But it’s compiled only if you have installed libyaml in some of ruby’s mkmf default search location.

Here’s how to make sure ruby will compile it:

You have homebrew installed in /usr/local:

brew install libyaml
rvm install ruby-1.9.2-p180

You have homebrew installed in ~/.homebrew:

brew install libyaml
rvm install ruby-1.9.2-p180 -C --with-libyaml-include=$HOME/.homebrew/include,--with-libyaml-lib=$HOME/.homebrew/lib

I tried to use the --with-libyaml-dir=$HOME/.homebrew/ shortcut, but it don’t work. So don’t loose your time.

blog comments powered by Disqus