Skip to content

Commit

Permalink
Added help message for gem i webrick in gem server command
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 10, 2020
1 parent b084f8a commit 4ccc662
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/rubygems/server.rb
@@ -1,5 +1,4 @@
# frozen_string_literal: true
require 'webrick'
require 'zlib'
require 'erb'
require 'uri'
Expand Down Expand Up @@ -424,6 +423,13 @@ class Gem::Server
ERB

def self.run(options)
begin
require 'webrick'
rescue LoadError
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
exit
end

new(options[:gemdir], options[:port], options[:daemon],
options[:launch], options[:addresses]).run
end
Expand Down

0 comments on commit 4ccc662

Please sign in to comment.