I'm working on a Rake task which fetches a file via an external URL. To do this, I have to require the Net::HTTP Ruby class in my .rake file.
This seems odd to me, because I've not loaded it in as a gem (I've not downloaded it from anywhere in fact), so this Ruby class must be pre-installed in the Rails framework. Yet in every .rake file I have, I have to require
it. So it must, for some reason, be inactive until I tell it otherwise(?).
This is not the same question as "How to require classes that I've created in different files". Rather, I want to know
Net::HTTP is part of the Ruby Standard Library, which is distributed with Ruby itself (not Rails). To use any of the standard libraries you must require them first.