Pregunta

I am trying to compile Ruby form source code on my Fedora 16 system.

These are the steps I followed:

  1. Compile the source code and install to my home directory: /home/gongzhen/program/ruby. When I run ruby -v I got:

    ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]
    
  2. Download "rubygems-2.0.3.zip" and unzip it. Running ruby setup.rb I got:

    RubyGems 2.0.3 installed
    /home/gongzhen/program/rubygems-2.0.3/lib/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- openssl (LoadError)
    

It tells me that openssl cannot be loaded.

Does anyone know how to build Ruby through source code? I think the version of Ruby is the latest, but it needs some dependency files which I do not have.

I tried to run openssl version and got the information below:

OpenSSL 1.0.0e-fips 6 Sep 2011

It means openssl was installed on my system.

¿Fue útil?

Solución

Do you have openssl-devel installed? After that's installed, you need to build the OpenSSL extension in ruby:

cd <source-dir>/ext/openssl
ruby extconf.rb
make
make install

<source-dir> is where ever you have the ruby source code on your filesystem.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top