Skip to content

Commit

Permalink
Added help message for gem i webrick in rdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 10, 2020
1 parent 4ccc662 commit e7433a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/rdoc/ri/driver.rb
Expand Up @@ -1551,7 +1551,12 @@ def setup_pager
# 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

Expand Down
8 changes: 7 additions & 1 deletion lib/rdoc/servlet.rb
Expand Up @@ -3,7 +3,13 @@
require 'erb'
require 'time'
require 'json'
require 'webrick'

begin
require 'webrick'
rescue LoadError
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
exit
end

##
# This is a WEBrick servlet that allows you to browse ri documentation.
Expand Down

0 comments on commit e7433a3

Please sign in to comment.