guides
guides copied to clipboard
Document default gems
Move original topic from @headius (a.k.a. @headies):
There's currently docs/guides on how to use most aspects of RubyGems except for default gems. I recognize that default gems are largely used by implementers (and perhaps installers) but there should still be some guide or howto written up.
I'm willing to write it, if there's a good place for such articles to live.
cc rubygems/rubygems#662
If by "default gems" the "gems installed by default" are meant, these are now covered (although in a minimalist fashion) on the RubyGems Basics page:
Listing installed gems ... (Ruby ships with some gems by default, bigdecimal, io-console, json, minitest, psych, rake, rdoc, test-unit for ruby 2.0.0).
"default gems" are slightly different than "installed by default". The latter is often referred to as "bundled" gems to be clear about the distinction.
"default gems" are gems that get installed directly into the standard library, and which are loadable without loading the RubyGems subsystem at all. If RubyGems is loaded, these stdlib-based gems can be upgraded, and RubyGems handles this by looking at a separate "default" specification directory which holds the specs for these gems.
You can see which gems are default in the CRuby repository by looking for .gemspec files, I believe, but this does not constitute a complete list. An example for the ostruct gem is here: https://github.com/ruby/ruby/blob/d3b2c1a17585ad30fb297ab489da0505e8b9b97a/lib/ostruct/ostruct.gemspec
There is a list of "bundled" gems (i.e. preinstalled but not directly into stdlib) here: https://github.com/ruby/ruby/blob/master/gems/bundled_gems
Note that JRuby handles default gems by maintaining a separate list (as part of our build script) and not versioning those gems in our repository. I would like to see CRuby do the same, since there have been many cases of diverging sources due to this duplicate versioning:
- https://github.com/ruby/ostruct/issues/11
- https://github.com/ruby/matrix/issues/12
- https://github.com/ruby/webrick/issues/48
- https://github.com/ruby/prime/issues/11
- https://github.com/ruby/tracer/issues/1
- https://github.com/ruby/prime/issues/9
cc @marcandre @hsbt
@headius Is what you'd like CRuby to do similar to what I proposed in https://bugs.ruby-lang.org/issues/16778?
@deivid-rodriguez That is EXACTLY what I want, and I added a +1000 comment there to support you. Let me know if I can do anything else to make this happen.
:smiley: That's great, thanks for your support! Maybe it gets some traction again, I'll be happy to find some time to work on it.
By the way this is an excellent resource for default gems: https://stdgems.org/.
By the way this is an excellent resource for default gems: https://stdgems.org/.
Very nice, thank you!