I am trying to run Rails development server over HTTPS
using a Self-Signed SSL Certificate. But when I start the rails server using:
rails s -b "ssl://0.0.0.0:8080?key=localhost.key&cert=localhost.crt"
It is giving me following error:
C:/Ruby23/lib/ruby/gems/2.3.0/gems/puma-3.11.0/lib/puma/binder.rb:149:in `check': SSL not available in this build (StandardError)
I am using ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]
It's fairly difficult to use puma with SSL on RubyInstaller-2.3, since you need to install OpenSSL on you own and convince puma to link to it. Fortunately this issue is solved with RubyInstaller-2.4 and newer. You need to install OpenSSL package and install puma afterwards, so that it's built with SSL support:
See also related issue on rubyinstaller2: https://github.com/oneclick/rubyinstaller2/issues/81