1
votes

SYS: Ubuntu 14.04 Ruby version: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux] Gem version: 2.4.8

I can't say that I have rich experience on rails, but when I tried to deploy rails on my new computer, I can't even install rails. This is the gem_make.out file
/usr/local/bin/ruby -r ./siteconf20151030-11581-1f0cbp1.rb extconf.rb checking if the C compiler accepts ... yes Building nokogiri using packaged libraries. * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/$(RUBY_BASE_NAME) --help --clean --use-system-libraries /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- openssl (LoadError) from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire' from /usr/local/lib/ruby/2.2.0/net/https.rb:22:in <top (required)>' from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire' from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' from /usr/local/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:3:in' from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in require' from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:inrescue in require' from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in require' from extconf.rb:395:in'

extconf failed, exit code 1 Since I have no way to use Openssl while make, I replaced the https source to http. Any suggestions?

3

3 Answers

2
votes

try the following to make sure you have the necessary libs:

sudo apt-get install ruby-dev zlib1g-dev libgmp-dev libxml2-dev libssl-dev openssl
2
votes

Yes, I found a way to solve, this is based on the solution of@matanco, mais his solution is not complete
sudo apt-get install ruby-dev zlib1g-dev libgmp-dev libxml2-dev libssl-dev openssl
after you execute this commande, you should compile you ruby installation again sudo sh ./configure
sudo make
sudo make install

-1
votes

Ruby code requires ssl native libraries and headers to be built.

This could solve your problem

sudo apt-get install libssl-dev