Projects for Rubys
Ruby projects are the practical applications where the language is used, mainly command-line scripts and web applications. Scripts use ARGV, files and gems to automate tasks, while web work often starts with Rack and Sinatra before moving to Rails. A project ties together methods, classes, gems and tests.
Stage: Applications · Part of the Ruby roadmap · Last reviewed 19 November 2026
What to learn in Projects
- Build a command-line tool that reads options from ARGV
- Structure a project with lib, bin and test folders
- Serve a small web page and JSON route with Sinatra
- Call an HTTP API using Net::HTTP and parse the response
- Package a script as a reusable gem
Projects interview questions
What is Rack and why does it matter for Ruby web apps?
Rack is a minimal interface between web servers and Ruby applications. An app is an object with a call method that receives an environment hash and returns status, headers and body. Rails and Sinatra are built on it, so middleware works across frameworks.
How would you structure a small Ruby command-line project?
Put the executable in bin, the classes in lib under a module namespace, and tests in test or spec. Keep the script thin and move logic into classes, so it can be tested. A Gemfile and a gemspec handle dependencies and packaging.
Where Projects fits in the Ruby roadmap
Projects belongs to the Applications stage (intermediate level). Use Ruby.