Skip to content
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

"uninitialized constant OpenURI::OpenSSL" when installing rdkafka gem using rubygems 3.2.1 #4161

Closed
1 of 5 tasks
bquorning opened this issue Dec 16, 2020 · 3 comments · Fixed by #4165
Closed
1 of 5 tasks

Comments

@bquorning
Copy link

bquorning commented Dec 16, 2020

I'm having a problem:

My current problem is that I cannot install the rdkafka gem using rubygems 3.2.1. I get an error that seems related to resolving the ::OpenSSL module.

This issue is related to:

  • Network problems
  • Installing a library
  • Publishing a library
  • The command line gem
  • Other
Installation output using rubygems 3.1.4
❯ docker run -ti --rm ruby:2.7.2@sha256:be3dfd137ddc3f97c0f5844d5e824c658e3907f3f5f9236d2c4d34390a76f9dc \
    sh -c 'gem update --system 3.1.4 ; gem install rdkafka:0.8.1'
Latest version already installed. Done.
Fetching rdkafka-0.8.1.gem
Fetching ffi-1.13.1.gem
Fetching mini_portile2-2.5.0.gem
Building native extensions. This could take a while...
Successfully installed ffi-1.13.1
Successfully installed mini_portile2-2.5.0
Building native extensions. This could take a while...
Successfully installed rdkafka-0.8.1
3 gems installed
Installation output using rubygems 3.2.1
❯ docker run -ti --rm ruby:2.7.2@sha256:be3dfd137ddc3f97c0f5844d5e824c658e3907f3f5f9236d2c4d34390a76f9dc \
    sh -c 'gem update --system 3.2.1 ; gem install rdkafka:0.8.1'
Updating rubygems-update
Fetching rubygems-update-3.2.1.gem
Successfully installed rubygems-update-3.2.1
Installing RubyGems 3.2.1
  Successfully built RubyGem
  Name: bundler
  Version: 2.2.1
  File: bundler-2.2.1.gem
Bundler 2.2.1 installed
RubyGems 3.2.1 installed
Regenerating binstubs
Regenerating plugins

[rubygems changelog removed, irrelevant for the reported issue]

------------------------------------------------------------------------------

RubyGems installed the following executables:
	/usr/local/bin/gem
	/usr/local/bin/bundle

RubyGems system software updated
Fetching ffi-1.13.1.gem
Fetching mini_portile2-2.5.0.gem
Fetching rdkafka-0.8.1.gem
Building native extensions. This could take a while...
Successfully installed ffi-1.13.1
Successfully installed mini_portile2-2.5.0
Building native extensions. This could take a while...
ERROR:  Error installing rdkafka:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/rdkafka-0.8.1/ext
/usr/local/bin/ruby -I/usr/local/lib/ruby/site_ruby/2.7.0/rubygems -rrubygems /usr/local/lib/ruby/gems/2.7.0/gems/rake-13.0.1/exe/rake RUBYARCHDIR\=/usr/local/bundle/extensions/x86_64-linux/2.7.0/rdkafka-0.8.1 RUBYLIBDIR\=/usr/local/bundle/extensions/x86_64-linux/2.7.0/rdkafka-0.8.1
rake aborted!
NameError: uninitialized constant OpenURI::OpenSSL
/usr/local/bundle/gems/rdkafka-0.8.1/ext/Rakefile:14:in `block in download_file_http'
/usr/local/bundle/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:543:in `with_tempfile'
/usr/local/bundle/gems/rdkafka-0.8.1/ext/Rakefile:12:in `download_file_http'
/usr/local/bundle/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:440:in `download_file'
/usr/local/bundle/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:54:in `block in download'
/usr/local/bundle/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:53:in `each'
/usr/local/bundle/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:53:in `download'
/usr/local/bundle/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:150:in `cook'
/usr/local/bundle/gems/rdkafka-0.8.1/ext/Rakefile:37:in `block in <top (required)>'
Tasks: TOP => default
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /usr/local/bundle/gems/rdkafka-0.8.1 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux/2.7.0/rdkafka-0.8.1/gem_make.out

The stacktrace mentions this line in the rdkafka gem, where I assume OpenURI.open_uri is being passed an https URL. OpenSSL is not explicitly mentioned in the rdkafka code, so that reference is probably made inside the C code of Ruby’s open-uri library.


I will abide by the code of conduct.

@deivid-rodriguez
Copy link
Member

Thanks for reporting, #4165 should fix this!

@bquorning
Copy link
Author

Thank you David. I’ll be looking forward to the next release. 🙏🏼

@deivid-rodriguez
Copy link
Member

Tomorrow!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants