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 OPENSSL_VERSION - server won't start #2296

Closed
maleksiuk opened this issue Jun 12, 2020 · 6 comments
Closed

Uninitialized constant OPENSSL_VERSION - server won't start #2296

maleksiuk opened this issue Jun 12, 2020 · 6 comments

Comments

@maleksiuk
Copy link
Contributor

Describe the bug

I installed Puma 5.0.0.beta1 on Windows without OpenSSL installed and when I try to start the server I get the error uninitialized constant Puma::MiniSSL::OPENSSL_VERSION (NameError) at lib/puma/minissl.rb:17.

I believe the problem is from commit ee85962 -- it's using constants such as OPENSSL_VERSION which are only defined if you build the C extension with OpenSSL installed (see the two alternate definitions of Init_mini_ssl()).

Puma config:

No Puma config or command line options.

To Reproduce

Install Puma on C-Ruby and without OpenSSL on your system, then run bundle exec puma hello.ru

Expected behavior

I expect the server to start.

Desktop (please complete the following information):

  • OS: Windows 10
  • Puma Version: 5.0.0.beta1 (master@a72c68b)
@MSP-Greg
Copy link
Member

MSP-Greg commented Jun 12, 2020

Sorry. I didn't check that locally, and all the CI uses OpenSSL.

I'll get a patch for that today or tomorrow.

Might I ask why you don't want to install the the MSYS2/MinGW OpenSSL package?

You didn't mention what Ruby version you're using, but the OpenSSL dll's are already included in most Windows Rubies. IOW, you don't need any OpenSSL exe's added to Path, etc, etc.

@maleksiuk
Copy link
Contributor Author

No problem, and no rush. I was just testing a patch I'm playing around with. I don't use Windows for Ruby development or for running servers, which is why I don't have OpenSSL installed.

I'm using Ruby 2.5.3 which I probably installed with RubyInstaller (but I can't remember).

Thanks for the response @MSP-Greg

@MSP-Greg
Copy link
Member

If you compiled Puma, you must have the devkit/MSYS2 installed. Assuming you're 64-bit, OpenSSL can be installed via:

ridk exec pacman -S mingw-w64-x86_64-openssl

The package is about 5 MB, installed is ~ 70 MB.

I'll still get the patch done soon.

@MSP-Greg
Copy link
Member

@nateberkopec

Quite a few tests fail. Should we skip them individually, or ignore them? If ignore them, group together and use one conditional, or end each method with end unless SKIP_OPENSSL?

@nateberkopec
Copy link
Member

@MSP-Greg Grouping into 1 conditional sounds cleaner to me if they're all in the same file. Otherwise individual skip unless.

@MSP-Greg
Copy link
Member

@maleksiuk

Sorry for the delay. #2305 should fix this, we're running CI on Windows without OpenSSL support and it's passing.

If this is still an issue, we can re-open.

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

No branches or pull requests

3 participants