Skip to content

Personal learning journey through Ruby and Ruby on Rails with notes, exercises, and small projects.

Notifications You must be signed in to change notification settings

No898/ruby-rails-journey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸšƒ Ruby & Rails Journey

This repository documents my personal learning journey with Ruby and Ruby on Rails. My goal is to gain a solid understanding of both the language and the framework β€” through small projects, real exercises, and gradual, consistent practice.

I treat this as a public playground, portfolio piece, and study log β€” everything I learn is tracked here.

πŸ†• New Focus: GoRails

As of Day 11, I’ve decided to shift a significant part of my daily practice from Exercism to GoRails β€” a professional learning platform focused on practical Rails development.

GoRails includes screencasts, real-world Rails patterns, API tutorials, background jobs, Turbo/Hotwire usage, and more. It aligns closely with my goals of mastering full-stack Rails development.

A new folder /gorails contains notes, exercises, and mini-projects based on GoRails content.


βš™οΈ Project CLI Helper (exe.rb)

To streamline working with Exercism Ruby exercises, this project includes a simple interactive CLI helper script named exe.rb (located in the project root).

What does exe.rb do?

  • Interactive testing and submission β€” You can run tests or submit solutions for any exercise by simply selecting options in the terminal, without typing long paths or filenames.
  • Automatic path discovery β€” The script will list all available exercises and valid files, so you always select the right one.
  • Cross-platform β€” Works out of the box on Windows, Mac, and Linux (requires only Ruby).

How does it work?

  1. Run the script in your terminal:

    ruby exe.rb
  2. Choose your action:

    • test β€” run the exercise's test file
    • submit β€” submit your solution to Exercism
  3. Select the exercise folder You get a menu of all available exercises.

  4. Select the file The script lists relevant Ruby files for the chosen action:

    • For test, it lists all *_test.rb files.
    • For submit, it lists all .rb files except tests.
  5. The script runs or submits your selection and prints output or Exercism URL.

Why did I create it?

Because I'm lazy πŸ˜„, instead of typing long commands or guessing file paths, I wrote this helper to save time and avoid mistakes.

Example usage

ruby exe.rb

Sample session:

Choose action:
1) test
2) submit
> 1

Choose folder:
1) lasagna
2) reverse-string
...

Choose file:
1) lasagna_test.rb
...

Running: ruby -r minitest/pride exercism/ruby/lasagna/lasagna_test.rb
...

Note for Windows users

This script is a plain Ruby script and works anywhere Ruby does β€” including Windows (CMD, PowerShell, Git Bash, or WSL). No Bash or extra libraries needed.

Requirements

  • Ruby installed (any recent version is fine)
  • Exercism CLI installed and authenticated (for submit command)

To keep your Ruby exercises organized and ensure they integrate seamlessly with this repository structure, make sure your Exercism CLI is properly configured.

By default, Exercism downloads exercises into a generic workspace. In this repository, we use the folder:

./exercism/ruby

βœ… Configuration Steps

Follow these steps to configure Exercism CLI to use the correct folder:

  1. Open your terminal

  2. Run the following command:

    exercism configure --workspace=./exercism
  3. Now, when downloading Ruby exercises, make sure you're inside the root of this repo:

    cd path/to/ruby-rails-journey
    exercism download --track ruby --exercise <exercise-name>

πŸ“Œ Result

Ruby exercises will now be saved into:

./exercism/ruby/<exercise-name>

This setup matches the structure used throughout this project and ensures everything stays tidy and consistent.


πŸ“ Folder Setup for Exercism CLI

To keep your Ruby exercises organized and ensure they integrate seamlessly with this repository structure, make sure your Exercism CLI is properly configured.

By default, Exercism downloads exercises into a generic workspace. In this repository, we use the folder:

./exercism/ruby

βœ… Configuration Steps

Follow these steps to configure Exercism CLI to use the correct folder:

  1. Open your terminal

  2. Run the following command:

    exercism configure --workspace=./exercism
  3. Now, when downloading Ruby exercises, make sure you're inside the root of this repo:

    cd path/to/ruby-rails-journey
    exercism download --track ruby --exercise <exercise-name>

πŸ“Œ Result

Ruby exercises will now be saved into:

./exercism/ruby/<exercise-name>

This setup matches the structure used throughout this project and ensures everything stays tidy and consistent.

🎯 Learning Objectives

🧠 Ruby (The Language)

βœ… 1. Fundamentals

  • Data types: Integer, Float, String, Symbol, Boolean, NilClass
  • Variables: local, global, instance (@), class (@@)
  • Conditionals: if, elsif, else, unless, ternary operator
  • Loops: while, until, for, loop, each
  • Methods: definition, parameters, return values
  • Blocks: do..end, {} syntax
  • Arrays and Hashes: CRUD, iteration
  • String manipulation: split, gsub, interpolation, upcase, etc.
  • File handling: File.read, File.write, working with JSON and CSV
  • Exception handling: begin, rescue, ensure
  • require, load, working with gems

🧱 2. OOP & Idiomatic Ruby

  • Classes and objects, constructors (initialize), self
  • attr_accessor, attr_reader, attr_writer
  • Inheritance (<) and calling super
  • Modules: module, include, extend
  • Method introspection: respond_to?, send, method_missing
  • yield, block_given?, Proc, lambda, closures
  • Enumerable module: map, select, reject, reduce, etc.
  • Symbols vs Strings β€” performance and semantics
  • Time and Date classes: Time.now, Date.today
  • Regular expressions: /pattern/, match?, scan, gsub
  • Standard library: OpenStruct, Struct, Set, etc.

πŸ§ͺ 3. Practical Extras

  • Gemfile & Bundler: bundle init, bundle install, bundle exec
  • Debugging: puts, p, irb, pry, byebug
  • Testing: Minitest basics (optionally RSpec)
  • CLI scripting: ARGV, OptionParser
  • Using environment variables: ENV['SOME_KEY']
  • Documentation tools: ri, yard, rubydoc.info
  • (Optional) Writing your own gem

πŸš‚ Ruby on Rails (The Framework)

  • Project structure and Rails conventions
  • MVC architecture (Model–View–Controller)
  • Generators and scaffolding
  • Routing and RESTful resources
  • CRUD with Active Record
  • Model validations and constraints
  • Working with forms (form_with, strong params)
  • Custom views, layouts, and partials
  • Flash messages and sessions
  • ViewComponent architecture for reusable components
  • Devise authentication with full authorization
  • Nested resources and associations (has_many, belongs_to)
  • Database migrations and schema design
  • Comprehensive testing (Minitest with extensive test suite - 118 tests)
  • Environment configs and secrets
  • Git project structure and .gitignore best practices
  • Modern frontend with Turbo + Stimulus + Tailwind CSS
  • Localization and internationalization (Czech translation)
  • Dark mode implementation with system preference detection
  • (Optional) Deployment to Render / Fly.io / Railway

πŸ›  Projects in This Repo

/ruby-cli

Small Ruby command-line projects built to practice the language.

/ruby-cli/ruby-todo

A fully functional command-line To-Do app written in Ruby. Tasks are stored in a JSON file for persistence. Supports: add, list, done, remove, clear. Automatically saves changes.

/ruby-cli/ai-terminal

A simple Ruby terminal chatbot that connects to OpenRouter's LLM APIs (e.g. Gemini 2.0 Flash, DeepSeek) using HTTP requests and environment variables.
Designed to explore how to work with APIs, handle .env, and build interactive CLI tools in pure Ruby.

/gorails

πŸ“š NEW! GoRails-based practice zone.

Contains solutions, notes, and code snippets based on the GoRails screencasts and tutorials. Structured to reflect real-world usage of Rails with topics such as background jobs, authentication, APIs, Hotwire, etc.

/exercism/ruby

All Ruby track exercises from Exercism, solved sequentially with test coverage and progressive difficulty.

/rails

Rails applications using MVC structure, built during exploration.

/rails/mini_crm

Advanced mini CRM application built on Ruby on Rails 8 with modern architecture and comprehensive functionality:

🎯 Key Features:

  • Complete contact management with CRUD operations, search, and active status
  • Advanced notes system with dual creation (from contacts or standalone) and authorization
  • ViewComponent architecture with 4 reusable components (Button, Notice, Avatar, Badge)
  • Complete Czech localization including proper grammar and pluralization
  • Dark mode support with system preference detection
  • Professional UI design with card layouts, avatars, and breadcrumb navigation
  • Comprehensive test suite with 118 tests covering all features
  • Devise authentication with full authorization and user management

πŸ›  Technical Stack:

  • Ruby on Rails 8 + SQLite
  • Tailwind CSS + ViewComponent + Heroicons
  • Turbo + Stimulus for modern frontend
  • Devise for authentication
  • Minitest with comprehensive testing

This project demonstrates modern Rails development patterns, component-based architecture, professional UI design, and extensive testing coverage.

/notes

Topic-based notes and study logs, organized by day (day1.md, day2.md, ...).


πŸ§ͺ Completed Exercises

  • βœ… Try Ruby

  • βœ… Exercism:

    • hello-world
    • lasagna
    • amusement-park (attendee)
    • amusement-park-improvements
    • reverse-string
    • log-line-parser
    • assembly-line
    • savings-account
    • port-palermo
    • two-fer
    • acronym
    • isogram
    • word-count
    • simple-calculator
    • chess-game
    • luhn
    • blackjack
    • eliuds-eggs
    • bird-count
    • boutique-inventory
    • boutique-inventory-improvements
    • raindrops
    • twelve-days
    • [!] bowling

πŸ“š Resources I'm Using

🧠 Ruby

πŸš‚ Ruby on Rails


✨ About

I'm a fullstack developer expanding my backend and Ruby skill set through real-world practice. This repo is my public learning log and technical growth tracker built one day, one lesson at a time.

About

Personal learning journey through Ruby and Ruby on Rails with notes, exercises, and small projects.

Topics

Resources

Stars

Watchers

Forks

Languages