A curated collection of Ruby and Rails interview questions, answers, and runnable examples.
This repository is organized to help learners and interviewers quickly find high-quality prompts, canonical answers, and small runnable snippets that demonstrate key Ruby and Rails concepts.
Top-level layout
questions/— categorized prompts (beginner, intermediate, advanced, rails)answers/— canonical answers in Q&A format that mirror thequestions/structureexamples/— small runnable Ruby and Rails example scripts (snippets and Rails-patterns)docs/— contribution guide, style and question format
Quick start — run examples These examples are plain Ruby files and can be run without Rails or extra gems.
ruby examples/snippets/blocks_examples.rb ruby examples/snippets/metaprogramming_examples.rb ruby examples/snippets/concurrency_examples.rb ruby examples/rails/service_object_example.rb
How to contribute
- Read
docs/how-to-contribute.mdfor the workflow and file templates. - Add new questions under
questions/<level>/and matching answers underanswers/<level>/using the Q&A format. - For runnable examples, prefer small, dependency-free scripts under
examples/that demonstrate a single concept.
Question & answer format
- See
docs/question-format.mdfor the required Q&A layout and front-matter conventions used in this repository.
Style
- Follow the recommendations in
docs/style-guide.mdfor writing clear questions and concise answers.
Thanks for contributing — check CONTRIBUTING.md for common scenarios and PR templates.