Ruby Standard Library
Basically every programming language that you’ll use in practice has some kind of standard library that is shipped with the language itself.
When you install Ruby on your computer this will also install the Ruby Standard Library. This means
you can simply
require and use the things it includes.
Its documentation isn’t the most pretty website on earth, but if you look at the “package” (library) names on the left you see things mentioned like:
benchmark: tools to test how performant your code is
debug: tools to make debugging code easier
securerandom: tools for encryption and security
erb: Ruby’s standard templating system
net/smtp: stuff for sending and receiving emails
zlib: tools for compressing files (you know
zipfiles, don’t you?)
And a lot of other things. These are fairly low-level tools, of course. You do not see a library for “logging in via Twitter or Google”. They’re more like nuts and bolts, rather than bicycles or cars, but they’re super useful nonetheless.
In order to make one of these libraries available in your code you don’t have
to do anything else other than use
require "zlib" would make the
library available, which means you could now use the methods
inflate in order to compress and decompress files.