Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Ruby with libyaml on Ubuntu 11.10?

I installed ruby-1.9.3-p0 on my Ubuntu 11.10 wubi and then rubygems to get Rails set up.

This is my code:

sudo ruby setup.rb 

I got this error:

"/usr/local/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." 

I installed libyaml and reinstalled Ruby but still it doesn't work. The information changed and I have no idea what's wrong with it.

like image 642
qian qian Avatar asked Dec 07 '11 05:12

qian qian


People also ask

What is the best way to install Ruby?

The most popular way to install Ruby on Linux or macOS is using a version manager, such as RVM, rbenv, chruby, or asdf. Version managers allow you to install several Ruby versions on your machine and quickly switch between them.


1 Answers

You must install the paquage libyaml-dev before installing ruby, if not you can still use extconf.rb for the missing library. So for this problem you can do (from the ruby install folder) :

cd ext/psych ruby extconf.rb make make install 

Extconf.rb is usefull for adding a library after have installed ruby.

like image 107
WebsoftFreelance Avatar answered Sep 19 '22 14:09

WebsoftFreelance