What is Rails autoloading (Zeitwerk)?

Updated May 24, 2026

Short answer

Zeitwerk automatically loads Ruby classes.

Deep explanation

It removes manual require statements using naming conventions.

Real-world example

Cleaner project structure without requires.

Common mistakes

  • Incorrect file/class naming breaks loading.

Follow-up questions

  • What replaced classic autoloader?
  • Why autoloading matters?

More Ruby on Rails interview questions

View all →