Missing psych (for YAML output) eventhough it is available

I am completely new to this

Please find my system details
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)

I installed ruby from source
$ ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

After installing ruby i got an error while running
$gem install bundler
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.

So i installed YAML from source , I followed these steps
$ 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
$ make
$ make install

And installed ruby from source again
$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
$ tar xzvf ruby-1.9.3-p0.tar.gz
$ cd ruby-1.9.3-p0
$ ./configure --prefix=/scratch/usr/RUBY --enable-shared
–disable-install-doc --with-opt-dir=/scratch/usr/RUBY/lib
$ make
$ make install

Then i exported these two flags

$ export CPPFLAGS=-I/usr/include
$ export LDFLAGS=-L/usr/lib

Again i run any command of gem i get the same error
[[email protected] bin]$ ls -al
total 52
drwxr-xr-x 2 root root 4096 Feb 25 04:34 .
drwxr-xr-x 6 usr usr 4096 Feb 25 04:34 …
-rwxr-xr-x 1 root root 4409 Feb 25 04:34 erb
-rwxr-xr-x 1 root root 558 Feb 25 04:34 gem
-rwxr-xr-x 1 root root 330 Feb 25 04:34 irb
-rwxr-xr-x 1 root root 1243 Feb 25 04:34 rake
-rwxr-xr-x 1 root root 800 Feb 25 04:34 rdoc
-rwxr-xr-x 1 root root 200 Feb 25 04:34 ri
-rwxr-xr-x 1 root root 11333 Feb 25 04:33 ruby
-rwxr-xr-x 1 root root 310 Feb 25 04:34 testrb
[[email protected] bin]$ ./gem --version
/scratch/usr/RUBY/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>’:
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
1.8.11

Please help , how can i proceed ?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs