diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-11-02 20:02:12 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-12-10 18:06:25 +0900 |
commit | 880727f037ee7dfeeb3dbc9027622798d46fdbac (patch) | |
tree | f0670f2c93cab1bf8c4ce0211e52cdb236aff281 /lib | |
parent | 05cc58c2ebc467ebc18897b1aef2c2089b26adf3 (diff) |
Added help message for gem i webrick in un.rb
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3729
Diffstat (limited to 'lib')
-rw-r--r-- | lib/un.rb | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |