Ruby on Rails
0Loading crowd target
0Loading crowd target
6correct to beat the crowd
40 free Ruby on Rails trivia questions with answers — science & nature quiz, new questions added Oct 2026.
Ruby on Rails changed how web applications get built. It appeared in the mid-2000s as the by-product of one small company's work, made an obscure programming language fashionable almost overnight, and went on to power some of the best-known sites on the internet. Its ideas about sensible defaults and writing less code have been borrowed by frameworks in nearly every other language. This quiz covers the story and the substance. Expect questions on where Rails came from and who wrote it, the companies that bet on it and the principles it is known for, alongside the practical knowledge a working developer uses daily: the files in a new project, the naming rules that tie code to database tables, the standard controller actions, the built-in security protections and the libraries that have come and gone from the default stack. It suits Rails developers who want to test themselves, candidates preparing for a Rails interview, and anyone curious about a framework with an unusually colourful history. Every answer comes with a short explanation, so a wrong guess still teaches something.
30 of 40 questions with answers and explanations. Play the quiz
Q 01Ruby on Rails was extracted from which project management tool built at the web company 37signals?
Basecamp
Basecamp was the product; the framework underneath it was pulled out and released as open source in July 2004.
Q 02Which social network moved parts of its Ruby on Rails stack to Scala after outages in 2007 and 2008?
Twitter kept Rails for its user interface until 2011, and the framework's creator blamed the outages on the company's own architecture rather than on Rails.
Q 03Which Danish programmer wrote Ruby on Rails, earning a Hacker of the Year award at OSCON in 2005?
David Heinemeier Hansson
David Heinemeier Hansson wrote the framework while building a web app for 37signals, then moved from Denmark to Chicago in November 2005.
Q 04The creator of Ruby on Rails is also a racing driver who has competed in which famous motor race?
24 Hours of Le Mans
The 24 Hours of Le Mans had him on the grid in 2012 with OAK Racing, in a season he also spent racing prototypes in the American Le Mans Series.
Q 05Ruby, the language behind Rails, got its name partly because ruby was what to a colleague of its creator?
Birthstone
Birthstone is the link. The name came out of an online chat in February 1993, before any code existed, and it beat the other candidate, Coral.
Q 06Which code-hosting site built with Ruby on Rails was hacked in 2012 to demonstrate a mass assignment flaw?
GitHub
GitHub was the target of researcher Egor Homakov, who broke in harmlessly after his earlier warnings about the weakness had been dismissed.
Q 07Rails names its technique of nesting cached page fragments inside one another after which toy?
Russian dolls
Russian dolls fit the idea: when one inner fragment changes, the untouched ones are reused while the outer fragment is rebuilt around them.
Q 08Which e-commerce platform grew out of Snowdevil, a snowboard shop its founder built with Ruby on Rails?
Shopify
Shopify began when Tobias Lütke, unhappy with the store software on the market, wrote his own and launched the shop after two months of work.
Q 09Which programmer designed Ruby, the language behind Rails, to make coders productive and happy?
Yukihiro Matsumoto
Yukihiro Matsumoto, known as Matz, announced the first public release of Ruby in December 1995, nearly a decade before Rails made the language famous.
Q 10Which Ruby on Rails principle explains why a model class called Sale maps to a table named sales?
Convention over configuration
Convention over configuration means a developer writes code only for the unusual cases, such as a table whose name Rails would never guess.
Q 11Which Rails component, named after a Martin Fowler design pattern, maps database tables to Ruby classes?
Active Record
Active Record is the M in MVC: it lets Ruby objects be saved to and loaded from a database without the developer writing SQL by hand.
Q 12Ruby on Rails has been released as open-source software since 2004 under which licence?
MIT License
The MIT License covers the code but not the branding: in 2007 the framework's creator applied to register the Rails name and logo as trademarks.
Q 13Which Rails generator produces a full set of CRUD files, from database table to web pages, in one command?
scaffold
The scaffold generator is meant for quick prototypes and starting points; its lighter cousin, the resource generator, creates no views and leaves the controller empty.
Q 21Which file in a Rails app's config folder maps incoming URLs to controller actions?
routes.rb
The routes.rb file is matched from top to bottom in the order its lines are written, so moving a line up can change which action answers a URL.
Q 22Among the seven standard actions of a Rails resource controller, which one displays a list of all records?
index
The index action answers a GET request to the collection path, such as /photos, while show handles a single record at /photos/:id.
Q 23Rails pluralises model names to find their tables, so a model class named Person maps to which table?
people
The people table shows that Rails handles irregular English plurals, and multi-word names get underscores too: LineItem maps to line_items.
Q 14Which Rails feature lets developers evolve a database schema over time in Ruby instead of hand-written SQL?
Migrations
Migrations each act as a new version of the database, so Rails can bring any copy of the schema forward from wherever it stands in that history.
Q 15Which file in the root of a Rails app lists the Ruby libraries the application depends on?
Gemfile
The Gemfile and its companion lock file are read by Bundler, the tool that fetches every gem a Rails application needs.
Q 16A new Rails app ships with three environments by default: development, test and which other?
production
The production environment completes the set; the guides suggest adding a custom one when a server mirrors the live site but is used only for testing.
Q 17A newly generated Rails application is set up to use which database unless told otherwise?
SQLite
SQLite needs no separate database server and keeps an entire database in a single file, so a fresh project runs with nothing extra to install.
Q 18Running the rails server command starts a Rails application listening on which port by default?
3000
Port 3000 is the default, which is why Rails tutorials point browsers at that number on localhost; the -p option picks a different one.
Q 19Rails views are written by default in which templating system that embeds Ruby code inside HTML?
ERB
ERB stands for Embedded Ruby, which is why a typical Rails view file has a name ending in .html.erb.
Q 20In a standard Rails resource, which HTTP verb is mapped to the controller's create action?
POST
POST is paired with create. Because the router matches the verb as well as the path, four URLs are enough to reach all seven standard actions.
Q 24Rails automatically fills in which column with the date and time a record was first saved?
created_at
The created_at column is one of a pair added by the timestamps macro; its partner, updated_at, changes again on every later save.
Q 25Which Rails association goes on the model whose table holds the foreign key, such as a book's author_id?
belongs_to
A belongs_to association takes a singular name, as in a book and its author, and unless marked optional it refuses to save when the associated record is missing.
Q 26What do Rails developers call the trap where loading a list fires one extra database query per record?
N+1 problem
The N+1 problem adds up fast: printing ten books with their authors takes eleven queries, which the includes method avoids by loading the authors in advance.
Q 27Rails adds a required security token to forms and other non-GET requests to block which kind of attack?
CSRF
CSRF, or cross-site request forgery, abuses a session the victim is still logged in to; a token that only the real site knows exposes the forged request.
Q 28Which reusable Rails view templates have filenames that begin with an underscore, such as _menu?
Partials
Partials carry the underscore only in the filename: a view asks to render "menu" and Rails goes looking for the file with the underscore in front.
Q 29Which web server, derived from Mongrel, is bundled with Rails and boots on the rails server command?
Puma
Puma was written by Evan Phoenix with an emphasis on speed and frugal memory use, and it is also the web server shipped with Mastodon.
Q 30Which JavaScript library became the Rails default in version 3.1, until Rails 5.1 stopped depending on it?
jQuery
jQuery arrived in the same release as CoffeeScript, and bowed out when Rails rewrote its own helper scripts in plain JavaScript.