From: Benoit Daloze Date: 2010-08-23T06:11:09+09:00 Subject: Re: YAML::dump slow On 22 August 2010 16:54, Piotr Szotkowski wrote: > Michael Fellinger: > >> If you're on 1.9.2, you could try the new YAML library psych: >> iota ~ % time ruby -rpsych -e 'Psych.load(Psych.dump(Dir["/sys/**/*"]))' >> 1.20s user 0.07s system 99% cpu 1.283 total > > What exactly do I need to have Psych on an Ubuntu/rvm install? > > chastell@devielle:~$ ruby -vrpsych -e '' > ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] > :29:in `require': no such file to load -- psych (LoadError) >  from :29:in `require' > chastell@devielle:~$ > > (Note: I have libyaml-dev installed.) > > — Piotr Szotkowski I had trouble also with rvm on OSX, my ruby did not find psych.so. I just had to reinstall, after installing libyaml in a usual path (/usr/local). I did have before libyaml with macports, but then you have to pass configure options like: rvm install ruby-1.9.2-head -C --with-libyaml-dir=/opt/local About Ubuntu, I believe it installs in a standard place, so you just need to install it again. (psych extension is simply not compiled if it does not find libyaml (yaml.h)) B.D.