1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Added help message for gem i webrick in un.rb

This commit is contained in:
Hiroshi SHIBATA 2020-11-02 20:02:12 +09:00
parent 05cc58c2eb
commit 880727f037
Notes: git 2020-12-10 18:06:56 +09:00

View file

@ -326,7 +326,12 @@ def httpd
"ServerName=NAME", "ServerSoftware=NAME",
"SSLCertificate=CERT", "SSLPrivateKey=KEY") do
|argv, options|
require 'webrick'
begin
require 'webrick'
rescue LoadError
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
exit
end
opt = options[:RequestTimeout] and options[:RequestTimeout] = opt.to_i
[:Port, :MaxClients].each do |name|
opt = options[name] and (options[name] = Integer(opt)) rescue nil