Install Ruby 1.9.3 with libyaml on centos

Source: Internet
Author: User

Ruby 1.9.3-P0 makes psych-the replacement for 1.8.7'sYamlLibrary, syck-the defaultYamlParser. Psych is a wrapper around und libyaml, so you're Going To Need it installed and configuredBeforeInstalling Ruby.

If you install 1.9.3-P0 without libyaml, You'll see warnings like this:

 
It seems your ruby installation is missing psych (ForYaml output). To eliminateThisWarning, please install libyaml and reinstall your ruby.
Installing libyaml
$ Wget http://pyyaml.org/download/libyaml/yaml-0.1.4.Tar.gz
$ Tar xzvf yaml-0.1.4.Tar.gz
$ CD yaml-0.1.4
$./Configure -- prefix =/usr/Local
$ Make
$ Make install

Quick review of what's going on: Download and untar the source code, change to the directory and install the package. You may need to sudoMake installCommand. Your mileage may vary.

Installing Ruby 1.9.3-P0
$ Wget http://ftp.ruby-lang.org/pub/ruby/1.9/Ruby-1.9.3-W.tar.gz
$ Tar xzvf ruby-1.9.3-W.tar.gz
$ CD ruby-1.9.3-P0
$./Configure -- prefix =/usr/Local-- Enable-shared -- disable-install-doc -- With-opt-Dir =/usr/Local/Lib
$ Make
$ Make install

After installing, you can verify that Ruby was installedRuby-V. It's also worth tryingGem -- versionTo make sure you don't get any errors regarding psych.

I tried installingLibyaml-develAndLibyamlFrom yum, but couldn't get Ruby installed and recognizing those packages. out of frustration, I turned to installing libyaml by source and it just worked

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.