In the beginning, there was "require"...
summary
Explains what calling require actually does: Ruby walks $LOAD_PATH, records entries in loaded_features, and Rubygems performs gem activation by adding a gem’s lib to the path. Shows when to use require_relative or manipulate $LOAD_PATH, why load always re‑evaluates files, and how Bundler with Bundler.setup plus Gemfile.lock pins versions. Distinguishes Ruby autoload from Rails implicit autoloading, why require_dependency existed and how Rails 6 rewrites autoloading so that explicit require_dependency is often unnecessary.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 4:00Require
- 8:45Ruby Gems
- 14:15MiniTests
- 15:28Requirements
- 16:05Bundler Setup
- 16:59Bundler Not require
- 17:34Autoload
- 18:42Rack
- 19:20Rails
- 19:49Rails Console
- 20:25Autoload paths
- 22:03lib and autoload paths
- 23:23require dependency
- 23:44autoloading
- 24:20required dependency
- 25:05Rails 6 autoloading
- 25:38Summary
- 25:50Conclusion
- 26:02Takeaways
- 26:41Options
- 27:03Implicit Autoload
related talks
38mLong journey of Ruby standard library
44mrequire() bombed my multi-threaded app!
36mHow Does Bundler Work, Anyway?
24mHow does Bundler work anyway?
29mRequire Hooks: Filling the Gap in Ruby's Extensibility
40mRuby's Environment Variable API
01h 04mCode is Required
35mDemystifying the Ruby package ecosystem
