Skip to content
Poignant Guide Ruby Q&A

Ruby Q&A guidelines for good questions

People post here because something does not work and they want to understand why. These guidelines keep Ruby Q&A useful to read and fair to the people who answer for free. By posting you agree to follow them.

Put code in code blocks

Code pasted as plain text loses its spacing, its quotes and sometimes its meaning. Wrap code in a fenced block, with three backticks above and below, and write ruby after the opening fence. Do not post screenshots of code or error text, because nobody can copy from them. Show the whole method or block, not half of it.

Make the code minimal

Cut your program down to the smallest piece that still shows the problem. Ten lines that run are worth more than two hundred that do not. Delete what does not matter and check that the short version still fails the same way. Very often you will find the bug while cutting, which is a fine outcome.

Give the full error and your Ruby version

Paste the whole error message and the lines under it, not just the first line. The backtrace says which file and line failed, and that is often the clue. Then run ruby -v in your terminal and paste the output. Ruby 2, 3 and 3.4 behave differently in places, and the Poignant Guide was written long before any of them. If Bundler or a gem is involved, also name the gem and its version.

Do not post secrets

A thread is public and stays searchable. Before you post, remove:

  • passwords and API keys
  • tokens and the contents of .env or credentials files
  • database URLs with a login in them
  • real names, addresses and customer data

Replace each with a placeholder like YOUR_API_KEY. If a secret reaches a public post, assume it is exposed and change it with the service that issued it. Then ask the staff to remove the post. See the contact page.

Show what you tried

Say what you expected, what happened, and what you have already tried. People are glad to help someone who has made an effort. Posting a task with no attempt and asking for the finished solution is not a question, and may be removed.

No homework done for graded work

Questions about a school or course exercise are welcome if you show your own attempt and ask about the idea you are stuck on, such as why a block returns what it does. Do not post a graded assignment and ask for the finished answer, and do not ask others to write code that you will hand in as your own. Staff may remove posts that do, and answers that hand over a complete graded solution may be removed too. If your course has a rule about outside help, follow that rule.

Be kind to beginners

Everyone here was stuck on a first NoMethodError once. Answer the question that was asked, in plain words, and explain the reason along with the fix. Do not mock a question as basic or answer only with "read the docs". If a question is unclear, ask one polite question back.

AI written answers must be checked and disclosed

You may use ChatGPT, Copilot, Claude or another tool to help write a reply, but you are responsible for it. Run the code in irb or a file before you post it, read the Ruby documentation for any method you are unsure about, and say clearly that the answer was written with AI help. AI tools invent methods that do not exist and mix up Ruby versions, so unchecked answers do harm. Posts that copy AI output without checking, or hide that it came from AI, may be removed. If the code in your question came from an AI tool, say so.

No spam

Do not post advertising, referral links or the same question in several sections. A link to your own project is fine when it directly answers the question and you say it is yours. Posts that exist to promote something, to build links or to push a product are removed.

Credit your sources

If you quote the docs, a chapter of the Poignant Guide, a blog post or a gem's README, link to it. If you copied code, say where from and under what licence.

Who enforces this

The staff are Odile Marchetti and Fenwick Hale. Report a problem by email to hello [at] poignantguide [dot] net with the post address. Staff can hide or remove a post, lock a thread, pin a thread, remove exposed credentials or personal details, and ban an account. Removal of exposed secrets and personal data comes first. The terms set out what moderation covers.

Updated