-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require 'openssl' causes NameError (uninitialized constant OpenSSL) in 1.0.0 RC14-dev #1614
Comments
@chrisseaton another regression |
I can't reproduce that. Is that file literally what you're running? |
That's not even our backtrace format. Can you show a full terminal session? |
@deepj It looks like you're tracking TruffleRuby master. If you've been doing so since before the Ruby 2.6.1 merge, you need to the extensions for the built-in native libraries. I'd recommend just doing a |
This is strange. I can't reproduce the above way in a different terminal session. But I can reproduce it in my specs. @chrisseaton I can offer a private repo here on Github. It's some old assignment which I upgraded to Ruby 2.6.1 and I tested some stuff in TruffleRuby @nirvdrum this is a nightly build offered by @chrisseaton to me |
Are you perhaps running a different Ruby as a sub-process? |
I use chruby. In the direction I have Installed rubies
|
This is an output when I run specs
|
@chrisseaton would you like have an access to the repo to try to reproduce it? |
@chrisseaton The issue is easily reproducible using this
Error:
|
I think I've now seen something similar locally now, but it's a very nonsensical problem. I mean if we're installing gems then |
@chrisseaton This didn't happen in RC13 ... |
Yes I know - it's a bug, it's not intended. |
This appears to be some kind of autoload issue. |
I still don't know exactly why it goes wrong but here's two points of it.
|
Reproduced by require 'net/http'
require 'openssl' |
Found the issue - thinking about a fix. |
autoload :Test2, './test2.rb'
require_relative './test2.rb'
p Object.autoload?(:Test2)
p Object.const_defined?(:Test2, false)
p Object.const_get(:Test2, false)
I don't think it's a regression. Maybe something else changed and exposed this bug. |
Yes, what changed is that |
Actually the diff is: diff --git a/lib/mri/net/http.rb b/lib/mri/net/http.rb
index 90f051978f..31cbb7a866 100644
--- a/lib/mri/net/http.rb
+++ b/lib/mri/net/http.rb
@@ -20,11 +20,11 @@
# See Net::HTTP for an overview and examples.
#
-require 'net/protocol'
+require_relative 'protocol'
require 'uri'
+autoload :OpenSSL, 'openssl'
module Net #:nodoc:
- autoload :OpenSSL, 'openssl' So the |
Turns out this was tagged all along
|
Workaround on the way. |
Worked around in 3a8b2c2. |
I added a proper fix for this in ec974a9. |
Version:
To reproduce:
Error:
The text was updated successfully, but these errors were encountered: