diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-10 16:20:21 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-10 18:06:25 +0900 |
commit | e7433a3288b48f90447bc8ebb1531f57be17392c (patch) | |
tree | 9c1c2397186eae205a046c8cb5cac0e3230dc0ad /lib/rdoc/ri | |
parent | 4ccc66265cdef0480eb6ff46f6be9f8de1a01891 (diff) |
Added help message for gem i webrick in rdoc
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3729
Diffstat (limited to 'lib/rdoc/ri')
-rw-r--r-- | lib/rdoc/ri/driver.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb index d5af47bf40..bb7f7f61a6 100644 --- a/lib/rdoc/ri/driver.rb +++ b/lib/rdoc/ri/driver.rb @@ -1551,7 +1551,12 @@ or the PAGER environment variable. # Starts a WEBrick server for ri. def start_server - require 'webrick' + begin + require 'webrick' + rescue LoadError + puts "webrick is not found. You may need to `gem install webrick` to install webrick." + exit + end server = WEBrick::HTTPServer.new :Port => @server |