2

I used the solution written by Radulescu to install openssl with ruby 1.9.3-p194. Then, I'm trying to require openssl, but I've got false return. Why?

bla git:(master) rails c
Loading development environment (Rails 3.2.6)
[1] pry(main)> require 'openssl'
=> false
Community
  • 1
  • 1
hugalves
  • 271
  • 4
  • 15

1 Answers1

4

This simply means the library has already been loaded. If you try typing OpenSSL, you'll see it's in your namespace.

By comparison, if you try to load a library that doesn't exist, you'll get an exception:

1.9.3p327 :003 > require 'does-not-exist'
LoadError: cannot load such file -- does-not-exist
Dave S.
  • 6,349
  • 31
  • 33
  • Hahahaha.. I was wasting my time looking for a solution and it was already done. Thank you! – hugalves Apr 23 '13 at 13:48
  • 2
    The [`require` docs](http://www.ruby-doc.org/core/Kernel.html#method-i-require) also explain when it would return false. `Loads the given name, returning true if successful and false if the feature is already loaded.` – Dennis May 29 '14 at 17:57