What is the Rails directory structure?

Answer

Key directories in a Rails app: app/ — application code (models, views, controllers, helpers, mailers, jobs, channels); config/ — routes, database.yml, application.rb, environments; db/ — migrations, schema.rb, seeds.rb; lib/ — custom library code and tasks; public/ — static files served directly; test/ or spec/ — test files; Gemfile — gem dependencies; config/routes.rb — URL routing. Understanding this layout is key because Rails automatically loads files in app/ based on naming conventions.