Install required libraries before install ruby.

https://github.com/postmodern/chruby/wiki/Ruby