Fails to require OpenSSL

Hey! So I had a little bit of a problem!

I'm running Ruby 2.2 with Rails 2.3. I'm trying upgrade rails to advances
versions. But everytime I run gem install rails. this happens.

himel@ubuntu:~/Downloads/Rubynew/ruby-2.2.0$ sudo gem install rails
Building native extensions. This could take a while...
ERROR: Error installing rails:
    ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby -r ./siteconf20150228-25704-26oogh.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/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require': cannot load such file -- openssl (LoadError)
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
    from /usr/local/lib/ruby/2.2.0/net/https.rb:22:in `<top (required)>'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
    from
/usr/local/lib/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
`<top (required)>'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in
`require'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in
`rescue in require'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in
`require'
    from extconf.rb:395:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in
/usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to
/usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/nokogiri-1.6.6.2/gem_make.out

*The other problem is that Ruby is failing to require openSSL whereas it is
already installed in the computer. I'm changed the Ruby gem sources to
http://rubygems.org instead of the https:// version.
I've rebuilt Ruby multiple times. Can someone help me out? I'm really stuck
here and don't know what to do. *

···

--
Himel Sarkar,
*himelsarkarforever.blogspot.com <http://himelsarkarforever.blogspot.com>*

* Here's to the crazy ones. The misfits. The rebels. The troublemakers. The
round pegs in the square holes. The ones who see things differently.
They're not fond of rules. And they have no respect for the status quo. You
can quote them, disagree with them, glorify or vilify them. About the only
thing you can't do is ignore them. Because they change things. They push
the human race forward. And while some may see them as the crazy ones, we
see genius. Because the people who are crazy enough to think they can
change the world are the ones who do.*

Hi, if you have mac you need to isntall xcode, after it launch this
command: xcode-select --install

···

2015-02-27 20:19 GMT+01:00 Himel Sarkar <hsarkar.007@gmail.com>:

Hey! So I had a little bit of a problem!

I'm running Ruby 2.2 with Rails 2.3. I'm trying upgrade rails to advances
versions. But everytime I run gem install rails. this happens.

himel@ubuntu:~/Downloads/Rubynew/ruby-2.2.0$ sudo gem install rails
Building native extensions. This could take a while...
ERROR: Error installing rails:
    ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby -r ./siteconf20150228-25704-26oogh.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/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require': cannot load such file -- openssl (LoadError)
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
    from /usr/local/lib/ruby/2.2.0/net/https.rb:22:in `<top (required)>'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
    from
/usr/local/lib/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
`<top (required)>'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in
`require'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in
`rescue in require'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in
`require'
    from extconf.rb:395:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in
/usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to
/usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/nokogiri-1.6.6.2/gem_make.out

*The other problem is that Ruby is failing to require openSSL whereas it
is already installed in the computer. I'm changed the Ruby gem sources to
http://rubygems.org instead of the https:// version.
I've rebuilt Ruby multiple times. Can someone help me out? I'm really stuck
here and don't know what to do. *

--
Himel Sarkar,
*himelsarkarforever.blogspot.com <http://himelsarkarforever.blogspot.com>*

* Here's to the crazy ones. The misfits. The rebels. The troublemakers.
The round pegs in the square holes. The ones who see things differently.
They're not fond of rules. And they have no respect for the status quo. You
can quote them, disagree with them, glorify or vilify them. About the only
thing you can't do is ignore them. Because they change things. They push
the human race forward. And while some may see them as the crazy ones, we
see genius. Because the people who are crazy enough to think they can
change the world are the ones who do.*

Hello,

Ubuntu and all debian derivatives have a sort of *-dev packages, which are required. For example, to build ruby manually on digital ocean, you need the following command (as root or with ’sudo’):

# apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison nodejs subversion

See if there’s anything missing from your ubuntu installation, for example ‘libssl-dev’ might be missing.

Panagiotis (atmosx) Atmatzidis

email: atma@convalesco.org
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

“There’s something that I’ve learned. I don’t believe in predetermined faith!” - Hitomi Kanzaki

No I'm running Ubuntu 12.04

···

On Sat, Feb 28, 2015 at 1:35 AM, Eugeniu T. <eugeniu.rtj@gmail.com> wrote:

Hi, if you have mac you need to isntall xcode, after it launch this
command: xcode-select --install

2015-02-27 20:19 GMT+01:00 Himel Sarkar <hsarkar.007@gmail.com>:

Hey! So I had a little bit of a problem!

I'm running Ruby 2.2 with Rails 2.3. I'm trying upgrade rails to advances
versions. But everytime I run gem install rails. this happens.

himel@ubuntu:~/Downloads/Rubynew/ruby-2.2.0$ sudo gem install rails
Building native extensions. This could take a while...
ERROR: Error installing rails:
    ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby -r ./siteconf20150228-25704-26oogh.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/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require': cannot load such file -- openssl (LoadError)
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
    from /usr/local/lib/ruby/2.2.0/net/https.rb:22:in `<top (required)>'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
    from
/usr/local/lib/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
`<top (required)>'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in
`require'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in
`rescue in require'
    from
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in
`require'
    from extconf.rb:395:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in
/usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to
/usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/nokogiri-1.6.6.2/gem_make.out

*The other problem is that Ruby is failing to require openSSL whereas it
is already installed in the computer. I'm changed the Ruby gem sources to
http://rubygems.org instead of the https:// version.
I've rebuilt Ruby multiple times. Can someone help me out? I'm really stuck
here and don't know what to do. *

--
Himel Sarkar,
*himelsarkarforever.blogspot.com <http://himelsarkarforever.blogspot.com>*

* Here's to the crazy ones. The misfits. The rebels. The troublemakers.
The round pegs in the square holes. The ones who see things differently.
They're not fond of rules. And they have no respect for the status quo. You
can quote them, disagree with them, glorify or vilify them. About the only
thing you can't do is ignore them. Because they change things. They push
the human race forward. And while some may see them as the crazy ones, we
see genius. Because the people who are crazy enough to think they can
change the world are the ones who do.*

--
Himel Sarkar,
*himelsarkarforever.blogspot.com <http://himelsarkarforever.blogspot.com>*

* Here's to the crazy ones. The misfits. The rebels. The troublemakers. The
round pegs in the square holes. The ones who see things differently.
They're not fond of rules. And they have no respect for the status quo. You
can quote them, disagree with them, glorify or vilify them. About the only
thing you can't do is ignore them. Because they change things. They push
the human race forward. And while some may see them as the crazy ones, we
see genius. Because the people who are crazy enough to think they can
change the world are the ones who do.*