diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-11-03 07:14:36 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-12-10 18:06:25 +0900 |
commit | 4ccc66265cdef0480eb6ff46f6be9f8de1a01891 (patch) | |
tree | 2c06f2c535c33cd0e449270eed5bcc5676a1b143 /lib | |
parent | b084f8abcf5b7310ce8f08d48a1a3f3e56876123 (diff) |
Added help message for gem i webrick in gem server command
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3729
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/server.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rubygems/server.rb b/lib/rubygems/server.rb index a9529f7923..61ea78bd9b 100644 --- a/lib/rubygems/server.rb +++ b/lib/rubygems/server.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'webrick' require 'zlib' require 'erb' require 'uri' @@ -424,6 +423,13 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; } 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 |