https://gist.github.com/FiveYellowMice/ … c9fc3bf6cf
Which means you can also do
curl -fsSL https://gist.github.com/FiveYellowMice/c50490693d47577cfe7e6ac9fc3bf6cf.txt | rbenv install --patch 1.9.3-p551
which does the same thing, but simpler.
]]>-Dan
]]>tl;dr; - always install rbenv and ruby-install from AUR, you'll probably need to custom patch to get around the openssl issue
The issue: I needed to install a specific version of ruby, I also needed rbenv installed to manage environments. I had a ton of errors with the git versions and Arch, mostly related to not finding the libreadline.so. Even passing the --with-readline-dir option didn't fix it. There was also a problem with the openssl library version.
The solution:
Eventually, I removed the git versions of rbenv and ruby-install then installed both from the AUR. This, and the dependencies from the rbenv wiki https://github.com/rbenv/ruby-build/wiki fixed the libreadline problem.
The wiki also mentions the openssl issue but the referenced patch didn't work. The verbose output said that it failed on line 104 of ext/openssl/extconf.rb. Comparing the patch (located at https://gist.githubusercontent.com/misl … 512bb5/raw) to the extconf.rb (in the /tmp/ruby-build.XXXXX dir) showed that the SURROUNDING lines were wrong. Not the lines to be patched.
I copied the patch locally, edited it to match the target file:
from
have_func("SSLv2_method")
have_func("SSLv2_server_method")
have_func("SSLv2_client_method")
+have_func("SSLv3_method")
+have_func("SSLv3_server_method")
+have_func("SSLv3_client_method")
have_func("TLSv1_1_method")
have_func("TLSv1_1_server_method")
have_func("TLSv1_1_client_method")
to
have_func("SSLv2_method")
have_func("SSLv2_server_method")
have_func("SSLv2_client_method")
+have_func("SSLv3_method")
+have_func("SSLv3_server_method")
+have_func("SSLv3_client_method")
unless have_func("SSL_set_tlsext_host_name", ['openssl/ssl.h'])
have_macro("SSL_set_tlsext_host_name", ['openssl/ssl.h']) && $defs.push("-DHAVE_SSL_SET_TL109")
end
(where the last 3 lines came from a local copy of /tmp/ruby-build.XXXXXX/ruby-1.9.3p448/ext/openssl/extconf.rb, lines 108-110 after a failed build)
then patched the file with the local copy:
cat openssl.patch | rbenv install -v --patch 1.9.3-p448