Closed ugultopu closed 3 years ago
Interesting point! My best guess would be if you just want that gem, without anything else. But really, I don't know, that's just a guess. I didn't think about it. I hope this helps!
Is understandable the confusion, on ruby there's 3 different Standard Libraries:
Integer
or String
)WEBrick
is a default gem, they are still part of the Standard Library, has own release cycle independent of the ruby version released by the ruby team. Being a gem by itself means you are able to use an updated version of those libraries or even an previous versions, it depends on your needs and a point on security context.
This talk by Shibata Hiroshi has more information about it:
https://www.youtube.com/watch?v=93nGROEgyEc
More info:
https://rubyreferences.github.io/rubyref/stdlib.html https://stdgems.org/
Hope this helps.
So if I understand correctly, you can change the version of a default gem on a Ruby version. Let's say Ruby version X comes with version Y of a default gem but you don't have to use that version. You can use a different version of that default gem still with the same version X of Ruby. That's when you might need gem install some-default-gem
.
WEBrick is no longer in the standard library starting with Ruby 3.0, unless that change is reverted before the 3.0 release. So we should definitely keep the installation section in the README.
You do learn something new every day.
Sorry for this noob question but isn't WEBrick a standard gem? I thought being a standard gem meant that there isn't any need to install it, since it comes with Ruby. If that's correct, then why does the README has an "Installation" section instructing us to install it using
gem
orbundle
?