Last updated: November 30, 2026
By Mike Carter, Managing Director, KORE1
The best Ruby on Rails developer interview questions in 2026 hand candidates a development log and ask what the app just did. Definitions can wait.
A wallet holds $50. Two checkout requests land together, each spending $50, and both report success. The balance afterward reads zero. It isn’t negative fifty, which somebody would notice by lunch. It’s a clean zero, exactly what a finance dashboard expects to see after one purchase, so the second $50 of goods leaves the building and nothing anywhere turns red.
Rails wrote all of it down. The whole story is eight lines in the development log, and a developer who knows Active Record can reconstruct both requests, the stale read, and the missing lock from those lines alone, without ever opening the source. Some can’t.
That one is Log 5. All six database logs are below, followed by a seventh for Hotwire teams and a way to score the hour, with a short verbal screen up front. Every log came out of a real run on Rails 8.1.4.1 with PostgreSQL 17.6 and Ruby 3.4. The six database logs were then rerun on Rails 7.2.4, where the same bugs showed up. The orders, wallets, and email addresses are test data, and where two requests had to collide, the test script held them at the right moment instead of waiting for luck to do it.
One disclosure. KORE1 places Rails engineers through our Ruby on Rails developer staffing practice and earns a fee when you hire one, so read the advice knowing that. Before we submit a senior platform candidate, our own panel has already put an upgrade scenario, a slow query, or a queue failure in front of them. These logs go on your own table, run by your own panel, and nothing about them requires a recruiter, an account, a paid assessment platform, or a phone call to us at any point. If you haven’t settled whether the seat is a Hotwire product job or a legacy monolith job, our guide to hiring Rails developers sorts that out first. And if the ad still needs writing, our Rails job description template covers versions, first-year goals, and pay.

Why Hand a Rails Candidate a Log
A Rails interview should show whether a developer can read what Active Record actually sent to the database and say what went wrong. The development log prints queries, transaction boundaries, and job enqueues in order, so it tests judgment that a definition of MVC or REST never reaches.
Anyone can recite what a has_many does. Reading a log is different. The candidate has to hold two requests in their head at once, notice the line that’s missing, and then say what the user would have seen, which is much closer to a Tuesday afternoon on your team than any whiteboard exercise will get.
It’s also hard to cram for. A candidate can memorize forty answers about callbacks and scopes the night before, but nobody can memorize which line is missing from a log they’ve never seen, about a bug they weren’t told was there.
A Verbal Screen That Takes Ten Minutes
Keep it short. These five questions only tell you whether the logs are worth printing, so don’t score them finely, don’t argue over phrasing, and don’t let a nervous candidate’s slow start on the first one color everything that follows.
| Question | What a passing answer includes |
|---|---|
How do preload, eager_load, and includes differ? | Separate queries, one LEFT OUTER JOIN, and a method that picks between them based on whether the query references the other table |
size, count, or length on a relation? | count asks the database, length loads the rows, size does whichever is cheaper given what’s already loaded |
Is present? a fine way to check that any order exists? | No. It loads every matching row. exists? asks for one |
| What does a new Rails 8 app use for jobs, caching, and WebSockets? | Solid Queue, Solid Cache, and Solid Cable, all database-backed, so Redis is optional |
| How would you index a large Postgres table that’s taking writes? | algorithm: :concurrently plus disable_ddl_transaction!, because Postgres can’t build that index inside a transaction |
Six Development Logs for the Interview Table
Print the log first and keep the code face down. Ask one question, “What did the app just do?” Turn the code over once they’ve committed to an answer. Timings, job IDs, and object addresses are cut from the excerpts; the SQL is as Rails printed it.
Log 1. The Page That Preloads and Still Loops
Order Load SELECT "orders".* FROM "orders" ORDER BY "orders"."id" ASC
LineItem Load SELECT "line_items".* FROM "line_items" WHERE "line_items"."order_id" IN ($1, $2, $3)
LineItem Count SELECT COUNT(*) FROM "line_items" WHERE "line_items"."order_id" = $1 [["order_id", 1]]
LineItem Count SELECT COUNT(*) FROM "line_items" WHERE "line_items"."order_id" = $1 [["order_id", 2]]
LineItem Count SELECT COUNT(*) FROM "line_items" WHERE "line_items"."order_id" = $1 [["order_id", 3]]orders = Order.includes(:line_items).order(:id)
orders.each { |order| puts order.line_items.count }Somebody already “fixed” the N+1 here. The includes is right there, the line items arrive in one query, and then count ignores every one of them and goes back to the database, once per order. Three orders cost five queries. Three hundred cost 302.
A good answer starts by pointing out that the preload worked and the loop threw it away, then swaps count for size, which used the loaded records and added no queries in the same script. Good. Push once more. “What if the page needs only returned items?” Calling order.line_items.where(returned: true) fired three more loads in our run. Filtering the loaded array with select(&:returned?) fired none, and a scoped association of its own is the better choice when each order has thousands of lines.
Log 2. The Wrong Three Orders
The ticket said to flag the three largest orders for review. The table held five, for $42, $9, $150, $42, and $42, created in that sequence.
Scoped order is ignored, use :cursor with :order to configure custom order.
Order Load SELECT "orders".* FROM "orders" WHERE (total_cents > 0) ORDER BY "orders"."id" ASC LIMIT $1 [["LIMIT", 3]]Order.where("total_cents > 0")
.order(total_cents: :desc)
.limit(3)
.find_each(&:flag_for_review!)The $9 order made the list. Two of the $42 orders didn’t. find_each walks a table in batches by primary key, so it threw away the sort, kept the limit, and handed back the three oldest rows with a one-line warning that is very easy to lose in a busy log.
Plain each is the fix. Three records never needed batching. A stronger candidate mentions that batch methods now take cursor and order options for the cases that do, and that setting config.active_record.error_on_ignored_order turns the warning into an exception. On 7.2.4 the warning is worded differently, “it’s forced to be batch order,” and the SQL is the same.
Log 3. The Rollback That Committed
TRANSACTION BEGIN
Audit Create INSERT INTO "audits" ("event") VALUES ($1) RETURNING "id" [["event", "checkout started"]]
Audit Create INSERT INTO "audits" ("event") VALUES ($1) RETURNING "id" [["event", "coupon applied"]]
TRANSACTION COMMITOrder.transaction do
Audit.create!(event: "checkout started")
Order.transaction do # lives in a coupon service
Audit.create!(event: "coupon applied")
raise ActiveRecord::Rollback
end
endBoth rows are in the table. The author asked for a rollback, got none, and got no error either.
The inner block didn’t open a transaction of its own. It joined the outer one. Then ActiveRecord::Rollback was swallowed by the inner block, as that exception is designed to be, and the outer block never heard about it and committed everything. The Rails API documentation describes this exact surprise. With requires_new: true on the inner block, our log gained a SAVEPOINT and a ROLLBACK TO SAVEPOINT, and only the first row survived.
Listen for how they found out. People who’ve been bitten tend to answer fast, and they usually go on to describe the coupon, the audit trail, or the half-created account that taught them, along with how many days passed before anyone on the team noticed.
Log 4. One Email, Two Accounts
TRANSACTION BEGIN
TRANSACTION BEGIN
User Exists? SELECT 1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", "pat@example.com"], ["LIMIT", 1]]
User Exists? SELECT 1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", "pat@example.com"], ["LIMIT", 1]]
User Create INSERT INTO "users" ("email") VALUES ($1) RETURNING "id" [["email", "pat@example.com"]]
User Create INSERT INTO "users" ("email") VALUES ($1) RETURNING "id" [["email", "pat@example.com"]]
TRANSACTION COMMIT
TRANSACTION COMMITThe model has validates :email, uniqueness: true. It ran twice. It passed twice. Each request looked, found nobody, and inserted. A gate in the test script held both between the check and the insert, which is the unlucky timing a double-clicked signup button can produce on its own.
The Rails guide says it plainly, that this validation does not create a uniqueness constraint in the database. A unique index does. With one added, the second request raised ActiveRecord::RecordNotUnique and one row remained. Seniors keep going without being asked. Existing duplicates have to be cleaned up before the index will build. The rescue belongs outside the transaction, because Postgres rejects further statements in a transaction after one has failed. And if they bring up create_or_find_by, ask whether the validation should stay, since the method’s own documentation says it shouldn’t.
Log 5. The $50 Wallet
TRANSACTION BEGIN
Wallet Load SELECT "wallets".* FROM "wallets" WHERE "wallets"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
TRANSACTION BEGIN
Wallet Load SELECT "wallets".* FROM "wallets" WHERE "wallets"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
Wallet Update UPDATE "wallets" SET "balance_cents" = $1 WHERE "wallets"."id" = $2 [["balance_cents", 0], ["id", 1]]
TRANSACTION COMMIT
Wallet Update UPDATE "wallets" SET "balance_cents" = $1 WHERE "wallets"."id" = $2 [["balance_cents", 0], ["id", 1]]
TRANSACTION COMMITWallet.transaction do
wallet = Wallet.find(id)
if wallet.balance_cents >= 5000
wallet.update!(balance_cents: wallet.balance_cents - 5000)
end
endHere’s the opening story. Look at the binds. Both updates write the number 0, worked out in Ruby from a balance each request read before the other had finished. It looks safe. Wrapping it in a transaction didn’t help, because Postgres runs at Read Committed by default and a plain SELECT takes no row lock.
Two fixes ran clean. wallet.with_lock adds FOR UPDATE, so the second request waited, reread a zero balance, and declined. A single conditional update_all that subtracts in SQL only where the balance is still high enough returned 1 for the first call and 0 for the second. I’d accept either one, and I’d also accept optimistic locking with a lock_version column, provided the candidate can say who catches the stale object error, who retries the spend, and what the customer sees in the meantime. I wouldn’t accept “add a validation.”
Log 6. The Job That Got There First
TRANSACTION BEGIN
Order Create INSERT INTO "orders" ("number", "total_cents") VALUES ($1, $2) RETURNING "id" [["number", "A-2001"], ["total_cents", 4200]]
[ActiveJob] Enqueued ReceiptJob to Async(default) with arguments: gid://shop/Order/4
Order Load SELECT "orders".* FROM "orders" WHERE "orders"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]]
[ActiveJob] [ReceiptJob] Error performing ReceiptJob: ActiveJob::DeserializationError (Error while trying to deserialize arguments: Couldn't find Order with 'id'="4")
TRANSACTION COMMITOrder.transaction do
order = Order.create!(number: "A-2001", total_cents: 4200)
ReceiptJob.perform_later(order)
finish_checkout # takes about a second
endRead the order of the lines. The job was queued, picked up, and dead before COMMIT appeared. It ran on a different database connection, and from where that connection stood the order didn’t exist yet, however plainly the INSERT three lines up appears to say that it did. We used Rails’ in-process Async adapter so one script could show it. The Active Job guide warns of the same race with Redis-backed queues, and notes that Rails 8 puts Solid Queue on a separate database by default, so the new stack doesn’t quietly save you.
On 8.1.4.1, enqueue_after_transaction_commit is false unless a job turns it on. We checked the source and then the behavior. Set it on the job, or enqueue from after_create_commit, and expect a strong candidate to say which one they’d make the team standard and why a rule that depends on everyone remembering will eventually be broken. Teams calling Sidekiq’s own API instead of Active Job have a separate switch, Sidekiq.transactional_push!. Then ask the nastier half. “What if checkout raises after the enqueue?” The order is gone and the job is still queued.

Add This One if the App Runs Hotwire
A user says the Save button does nothing. No error message. The log looks healthy.
Started PATCH "/profile" for 127.0.0.1
Processing by ProfilesController#update as TURBO_STREAM
Parameters: {"profile" => {"display_name" => ""}}
Completed 200 OKThe failed branch of the controller says render :edit and nothing more, which answers with a 200. Turbo expects a form submission to get a 303 redirect, or a 4xx or 5xx it can render. A plain 200 gets neither treatment, so the validation errors never reach the screen.
Passing means status: :unprocessable_content, or :unprocessable_entity on older Rack. In our mini app, built with turbo-rails 2.0.23, that one argument changed the last line to Completed 422 Unprocessable Content. Anyone who has shipped Hotwire forms should get there in under a minute. If their first move is to write a Stimulus controller that catches the response and swaps the HTML in by hand, you’ve learned something useful about how they debug.
Which Logs Fit Which Level
Don’t give a mid-level developer all seven. Too many. Pick by the seat.
| Seat | Start with | A pass sounds like |
|---|---|---|
| Mid-level | Logs 1, 2, and Hotwire | Names the cause from the log and writes a working fix |
| Senior | Logs 3, 5, and 6 | Adds a test that fails today and says what the fix costs |
| Lead or staff | Logs 4 and 6, then the upgrade question | Plans the rollout, the data cleanup, and the rule that stops a repeat |
The shape of the codebase matters as much as the title, and it’s worth ten minutes with whoever carries the pager to find out which of these failures your application has actually had in the past year.
- Payments, credits, or inventory. Logs 5, 6, and 3, in that order.
- A young Hotwire product with a small team will get more out of the Hotwire log and log 1.
- Old monolith? Log 4, then the upgrade question below.
Moving part of the app to Phoenix is a different interview, and our Elixir developer interview questions cover it.

Then Ask About the Upgrade
This one has dates. As of November 30, 2026, the Rails maintenance policy shows 8.1 as the only series still receiving security fixes, through October 10, 2027. Security support for 8.0 ended on November 7. Anything on 7.2 or older is past its window too. On the language side, Ruby 3.2 reached end of life on April 1, 2026, and 3.3 gets security fixes only, with an expected end of March 31, 2027.
So ask it straight. Use your real version. “We’re on 7.1. What do your first two weeks look like?”
Strong candidates don’t promise a jump to 8.1. Not in one move. They go one minor version at a time, as the upgrade guide advises, check the Ruby version first, run bin/rails app:update and read the diff instead of accepting it, and switch new framework defaults on a few at a time across several deploys. The best ones ask about test coverage before they say anything about versions. Some ask which gems you’ve forked, which background job backend is in production, and whether anyone who wrote the original monkey patches still works at the company. Very good sign.
Scoring the Hour Without Arguing About It
Give every candidate for the same seat the same logs and the same follow-ups. Federal hiring guidance from OPM describes structured interviews that way, with set questions and a shared rating scale, and ties them closely to job performance.
Three marks per log is plenty. Did they name the cause before seeing the code? Did their fix work? Could they say what it costs, whether that’s a lock held longer, an index build, or a job delayed until commit? Write the marks down before anyone on the panel speaks. The loudest interviewer will otherwise decide the score, usually in the first two minutes of the debrief, and it won’t always be the person in the room who knows Active Record best or who’ll be reviewing this hire’s pull requests.
Budget it. An hour fits ten minutes of verbal screen, three logs at about twelve minutes each, and the upgrade question. Whatever’s left is theirs. Protect it.
What Rails Hiring Teams Ask Us
Should candidates run the code during the interview?
Reading comes first, running second. A printed log shows what someone notices unaided, and a console afterward shows how they test a hunch.
If they open bin/rails console and turn on SQL logging without being told, that’s a habit you want.
Will an AI assistant just answer these?
It can get a first answer, so put your grade on the follow-up. Change one detail and ask which log lines would move.
Swap the wallet for seat inventory. Put the enqueue after the transaction block. Someone who understood the first answer adjusts in seconds and can tell you which statement moves and why, while someone who pasted it usually has to go back to the window and paste again. Teams that code with an assistant every day should allow one in the room, screen shared, and watch which suggestions the candidate takes without checking.
Do these logs apply to a MySQL app?
The ideas carry over, but these excerpts came from PostgreSQL only. Rerun logs 4 and 5 on your own database before you print them.
Isolation levels and locking differ between the two engines, MySQL’s default isn’t the same as the Postgres default, and an interviewer who confidently grades against the wrong database’s behavior will eventually mark a correct answer as a miss.
Should we still ask algorithm puzzles?
Rarely for a product team. Puzzles measure recent practice with puzzles, while the job is reading a dense codebase and predicting what the database will be asked to do.
Our hiring guide makes the longer case, and suggests a code reading round on a scrubbed piece of your own app.
What does a Rails developer cost in 2026?
Plan on about $115,000 to $145,000 in base pay at mid-level and $160,000 to $200,000 for senior engineers, the bands in our Rails hiring guide.
Contract work runs $95 to $150 an hour on our Rails staffing page, which also draws the senior salary band wider, starting at $145,000. Neither page is your city, so run the role through the salary benchmark assistant before you set an offer. Our Rails developer salary guide breaks base pay out from junior to staff. Federal wage data has no Rails line. The nearest figure is the Bureau of Labor Statistics median for all software developers, $135,980 as of May 2025.
I’m the candidate. How should I practice?
Turn on Active Record logging, type each snippet, and predict the SQL on paper before you run it.
Then explain it aloud in under two minutes. Start with what the user would see, go to the line in the log that proves it, and finish with the fix and its price. Don’t memorize these seven. Break your own code in new ways, by running two consoles against one row or raising halfway through a nested block, and read what comes out.
Search Your Own Logs First
Before the interview, grep this week’s logs for “Scoped order is ignored.” Then search the codebase for perform_later inside a transaction block, and for uniqueness validations with no matching index. Whatever you find is a better question than any of mine, because the candidate will be the one maintaining it.
If you’d like help filling the seat, send us the stack and the problem you most need solved. Upgrades have a finish line, which is why they tend to go to contract staffing, while the engineer who has to live with the codebase afterward is better brought on through direct hire. Across our IT placements, 92 percent are still in the seat at 12 months. Bring a log. We like those.

