oneclick / rubyinstaller2

MSYS2 based RubyInstaller for Windows
https://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
646 stars 248 forks source link

Fix a runtime error when running cgi in WEBrick http server. #260

Closed HirohitoHigashi closed 2 years ago

HirohitoHigashi commented 2 years ago

I use Ruby 27 2.7.4-1 x64 msvcrt and running WEBrick. When run the CGI program, I got a runtime error in msys2_installation.rb.

error message is here.

C:/Ruby27-x64/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/msys2_installation.rb:76:in `iterate_msys_paths': undefined method `split' for nil:NilClass (NoMethodError)

When running the CGI program, the ENV environment variables were rewritten to the values for CGI.

e.g.

{"GATEWAY_INTERFACE"=>"CGI/1.1", "HTTP_ACCEPT"=>"text/html,application..."}
larskanis commented 2 years ago

Makes sense. Thank you!