WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Ruby SSL issue => gem install not working  (Read 2431 times)

Offline fred78800

  • Newbie
  • *
  • Posts: 2
Ruby SSL issue => gem install not working
« on: September 25, 2015, 11:58:30 AM »
Issue discovered using gem install.

Can also be raised from irb :
Code: [Select]
irb(main):001:0> require 'openssl'
LoadError: /usr/local/lib/ruby/2.0.0/i686-linux/openssl.so: undefined symbol: SSLv2_method - /usr/local/lib/ruby/2.0.0/i686-linux/openssl.so
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/2.0.0/openssl.rb:17:in `<top (required)>'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from (irb):1
from /usr/local/bin/irb:12:in `<main>'

Looks very similar to Python-SSL issue described recently : http://forum.tinycorelinux.net/index.php/topic,18804.msg115240.html#msg115240

May it be possible to have ruby.tcz rebuilt? (as python.tcz was rebuilt for previous issue)
Or should I build ruby from source to fix issue?

Thanks.

NOTE
I am using ruby 2.2.0 in fact.
2.0.0 shows up here because I tried to downgrade version to solve problem, without success.

Offline archieb0ld

  • Newbie
  • *
  • Posts: 20
Re: Ruby SSL issue => gem install not working
« Reply #1 on: April 25, 2016, 06:03:13 PM »
bump

Is there a solution to this problem? I'm trying (using ruby-2.2.tcz, x86):
Code: [Select]
tc@box:~$ gem install metalsmith
ERROR:  Loading command: install (LoadError)
        /usr/local/lib/ruby/2.2.0/i686-linux/openssl.so: undefined symbol: SSLv2_method - /usr/local/lib/ruby/2.2.0/i686-linux/openssl.so
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

openssl.tcz and compiletc.tcz are installed
« Last Edit: April 25, 2016, 06:12:08 PM by archieb0ld »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14741
Re: Ruby SSL issue => gem install not working
« Reply #2 on: April 26, 2016, 02:12:56 AM »
The ruby extension needs to be recompiled

Offline fred78800

  • Newbie
  • *
  • Posts: 2
Re: Ruby SSL issue => gem install not working
« Reply #3 on: April 26, 2016, 01:49:05 PM »
In fact I ended up recompiling from source.
Using script below to configure options.

Code: (bash) [Select]
#!/bin/sh

CONFIGURE=/tmp/ruby-2.2.3/configure

$CONFIGURE  --enable-shared \
            --disable-install-doc \
            --with-openssl-dir=/usr/local \
            --with-readline-dir=/usr/local \
            --with-gdbm-dir=/usr/local \
            --with-tcl-dir=/usr/local \
            --with-tk-dir=/usr/local \
            CFLAGS="-Os -pipe" \
            CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti"