Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 26428  / 2 Years ago, thu, september 15, 2022, 11:27:19

I'm trying to setup github-pages on my Ubuntu laptop, and following the guide provided by Github I have to install the bundler package; giving the command



~$ gem install bundler


returns me this error.



ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources



Then I have installed OpenSSL, launched the command to update software and stuff and tried again to install bundler, but the error kept showing.



How can I fix this? Is there any specific command to rebuild ruby making it aware about the fact that openSSL is now installed?


More From » ruby

 Answers
1

I've found the answer to my own question, and I think it would be more clear to post as an answer, rather than editing the question.



1st try. Let's go through the path of non-safe source link.



As pointed out here, a possible choice to bypass the openSSL check is to remove the safe https link and add the non-safe one:



gem source -r https://rubygems.org/
gem source -a http://rubygems.org/


This way, the installation seems to go fine, but somewhere around the process openSSL is required again (for nokogiri gem, if I remember it well).



2nd try. Rebuild Ruby (it was so easy).



By the time I asked this question, my brain was probably not working properly. After installing openSSL by the usual way:



sudo apt-get install openssl


I got to my ruby directory and typed the following lines:



pushd ext/openssl
ruby extconf.rb
make
make install
popd


This way, I had all dependencies issues and stuff solved (I guess). Then, running



./configure
make
make install


I've rebuilt Ruby and finally the installation went fine.


[#23574] Friday, September 16, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enefiama

Total Points: 43
Total Questions: 125
Total Answers: 102

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
;