The
Ruby
Workshop

Built by a team of experts to help you unlock your next promotion, reboot your career, or kick off your latest side project.

Get Started Today

You'll be up and running with Ruby in no time at all.

  • $34.99

    $34.99The Ruby Workshop

    Unlock one year of full, unlimited access and get started right away!
    Learn for Free

Engineered for Success

Nobody likes going through hundreds of pages of dry theory, or struggling with uninteresting examples that don’t compile. We've got you covered. Any time, any device.

  • Learn by doing real-world development, supported by detailed step-by-step examples, screencasts and knowledge checks.

  • Become a verified practitioner, building your credentials by completing exercises, activities and assessment checks.

  • Manage your learning based on your personal schedule, with content structured to easily let you pause and progress at will.

Learn By Doing

You already know you want to learn Ruby, and the smarter way to learn Ruby is to learn by doing.

The Ruby Workshop focuses on building up your practical skills so that you can kick-start your career as a developer and rapidly prototype applications. You'll learn from real examples that lead to real results.

On Your Terms

Build up and reinforce key skills in a way that feels rewarding.

You won't have to sit through any unnecessary theory. If you're short on time you can jump into a single exercise each day or spend an entire weekend learning about metaprogramming.

An Ideal Start

Fast-paced and direct, The Ruby Workshop is the ideal companion for newcomers.

You'll build and iterate on your code like a software developer, learning along the way. This process means that you'll find that your new skills stick, embedded as best practice. A solid foundation for the years ahead.

Begin Your Journey

A simple, straightforward and pain-free way to learn Ruby.

  • $34.99

    $34.99The Ruby Workshop

    Unlock one year of full, unlimited access and get started right away!
    Learn for Free

Everything You Need

Every Workshop includes access to dedicated support, course discussions and a wider learning community. Ask questions, share answers and work with the community to expand your learning.

  • Engage and participate in live user discussions, baked right into your course from start to finish. Share, learn and grow together.

  • Get live updates and interact directly with the product development, editorial and authoring teams across the Packt network.

  • Create, showcase and share your own learning outcomes and motivational stories across the entire workshop community.

Get Build-Ready

Every Workshop includes a whole host of features that work together to help you get the job done. You’ll be ready to tackle real-world development in no time.
  • Hack Your Brain

    We've applied the latest pedagogical techniques to deliver a truly multimodal experience. It'll keep you engaged and make the learning stick. It's science!

  • Build Real Things

    Nobody likes wasting their time. We cut right to the action and get you building real skills that real, working developers value. The perfect approach for a career move.

  • Learn From Experts

    We've paired technical experts with top editorial talent. They've worked hard to deliver you the maximum impact for each minute you spend learning. It's our secret sauce.

  • Verify Your Credentials

    You can become a verified practitioner. Complete the course to get a certificate. It's perfect for sharing on social media. Hello LinkedIn!

  • Receive Free Updates

    Technology keeps changing, and so do we. We keep versions updated independently, so you'll always have access. No more worrying about third-party release cycles.

  • Access Anywhere

    All you need is an internet connection. We've built every course so that it works on desktop and mobile, giving you options that fit within your schedule.

What's Inside

From A to Z, we've got you covered!

  • Workshop Onboarding

    • Welcome to the Ruby Workshop
    • Installation and Setup
    • Credits
  • 1. Writing and Running Ruby Programs

    • Overview
    • Interactive Ruby Shell
    • Exercise 1.01: Creating and Assigning Variables
    • Exercise 1.01: Creating and Assigning Variables
    • Exercise 1.02: Assigning a Variable of One Data Type to a Different Type
    • Exercise 1.02: Assigning a Variable of One Data Type to a Different Type
    • Exercise 1.03: Getting the Type of a Variable
    • Exercise 1.03: Getting the Type of a Variable
    • Running Ruby Code from Ruby Files
    • Exercise 1.04: Getting User Input in a Ruby Program
    • Exercise 1.04: Getting User Input in a Ruby Program
    • Exercise 1.05: Performing Common Integer Operations
    • Exercise 1.05: Performing Common Integer Operations
    • Exercise 1.06: Using Common Integer Methods to Perform Complex Arithmetic
    • Exercise 1.06: Using Common Integer Methods to Perform Complex Arithmetic
    • Exercise 1.07: Performing Common Operations for Floating-Point Numbers
    • Exercise 1.07: Performing Common Operations for Floating-Point Numbers
    • String
    • Exercise 1.08: Using Common String Methods
    • Exercise 1.08: Using Common String Methods
    • Exercise 1.09: Performing String Concatenation
    • Exercise 1.09: Performing String Concatenation
    • Exercise 1.10: Performing String Interpolation
    • Exercise 1.10: Performing String Interpolation
    • Exercise 1.11: Extracting and Searching a Substring from a String
    • Exercise 1.11: Extracting and Searching a Substring from a String
    • Exercise 1.12: Replacing Part of a String with Another String
    • Exercise 1.12: Replacing Part of a String with Another String
    • Exercise 1.13: Replacing All the Values inside a String Using gsub
    • Exercise 1.13: Replacing All the Values inside a String Using gsub
    • Exercise 1.14: Splitting a String and Joining a String
    • Exercise 1.14: Splitting a String and Joining a String
    • Activity 1.01: Generating Email Addresses Using Ruby
    • Boolean
    • Activity 1.02: Calculating the Area and Perimeter of a Candy Manufacturing Plant
    • Summary
  • 2. Ruby Data Types and Operations

    • Overview
    • Arrays
    • Exercise 2.01: Performing Simple Operations on Arrays
    • Exercise 2.01: Performing Simple Operations on Arrays
    • Exercise 2.02: Performing Complex Operations on Arrays
    • Exercise 2.02: Performing Complex Operations on Arrays
    • Hashes
    • Exercise 2.03: Converting a Time String to a Hash
    • Exercise 2.03: Converting a Time String to a Hash
    • Ruby Methods
    • Activity 2.01: Dice Roller Program
    • Summary
  • 3. Program Flow

    • Overview
    • Boolean Operators
    • Exercise 3.01: Implementing Boolean Operators
    • Exercise 3.01: Implementing Boolean Operators
    • Conditional Expressions
    • Comparison
    • Exercise 3.02: Creating a Method to Check Your Balance
    • Exercise 3.02: Creating a Method to Check Your Balance
    • The case/when Statement
    • The Ternary Operator
    • Exercise 3.03: Speed Determiner
    • Exercise 3.03: Speed Determiner
    • Loops
    • Exercise 3.04: Developing a Mind Reader
    • Exercise 3.04: Developing a Mind Reader
    • The until/do Loop
    • Exercise 3.05: Developing an Arbitrary Math Method
    • Exercise 3.05: Developing an Arbitrary Math Method
    • Activity 3.01: Number-Guessing Game
    • Summary
  • 4. Ruby Methods

    • Overview
    • The Basic Structure of the Ruby Method
    • Return Values
    • Exercise 4.01: Performing Operations on an Array
    • Exercise 4.01: Performing Operations on an Array
    • The Splat Operator
    • Exercise 4.02: Creating a Method to Take Any Number of Parameters
    • Exercise 4.02: Creating a Method to Take Any Number of Parameters
    • Duck Typing
    • Sending a Message
    • Exercise 4.03: Using the Math Library to Perform Mathematical Operations
    • Exercise 4.03: Using the Math Library to Perform Mathematical Operations
    • Exercise 4.04: Performing Method Operations with the Time Module
    • Exercise 4.04: Performing Method Operations with the Time Module
    • Activity 4.01: Blackjack Card Game
    • Summary
    • Survey I
  • 5. Object-Oriented Programming with Ruby

    • Overview
    • Classes and Objects
    • Getters and Setters
    • Exercise 5.01: Modeling a Company's Organizational Chart Using Classes
    • Exercise 5.01: Modeling a Company's Organizational Chart Using Classes
    • Class Methods
    • Exercise 5.02: Generating URLs for Sharing Content on Social Platforms
    • Exercise 5.02: Generating URLs for Sharing Content on Social Platforms
    • Inheritance
    • Exercise 5.03: Modelling a Class for Location Addresses
    • Exercise 5.03: Modelling a Class for Location Addresses
    • Encapsulation
    • Exercise 5.04: Demonstrate the Visibility Rules of Ruby Methods
    • Exercise 5.04: Demonstrate the Visibility Rules of Ruby Methods
    • Bypassing Visibility
    • Activity 5.01: Voting Application for Employee of the Month
    • Summary
  • 6. Modules and Mixins

    • Overview
    • Including Modules
    • Exercise 6.01: Controlling the Operations of Services in an Application
    • Exercise 6.01: Controlling the Operations of Services in an Application
    • Inheritance with Module Methods
    • extend
    • Exercise 6.02: Extending Your Modules with Class and Instance Methods
    • Exercise 6.02: Extending Your Modules with Class and Instance Methods
    • Exercise 6.03: Using Module Functions to Extend Classes
    • Exercise 6.03: Using Module Functions to Extend Classes
    • Importing Modules as Class Methods using Extended
    • Exercise 6.04: Writing a Module to Define Payment Methods for a Product Application
    • Exercise 6.04: Writing a Module to Define Payment Methods for a Product Application
    • Module Methods
    • Namespaces
    • Exercise 6.05: How to Reuse Constants with a Namespace
    • Exercise 6.05: How to Reuse Constants with a Namespace
    • prepend
    • Exercise 6.06: Prepending Modules to Classes
    • Exercise 6.06: Prepending Modules to Classes
    • Activity 6.01: Implementing Categories on the Voting Application Program
    • Summary
  • 7. Introduction to Ruby Gems

    • Overview
    • RubyGems and the require Method
    • Using Gems in Your Code
    • Exercise 7.01: Installing and Using a Ruby Gem
    • Exercise 7.01: Installing and Using a Ruby Gem
    • File I/O
    • Handling CSV Data
    • Exercise 7.02: Reading Data from a .csv File and Printing a Few Columns
    • Exercise 7.02: Reading Data from a .csv File and Printing a Few Columns
    • Reading Data from a .csv File Using CSV.foreach
    • Writing Data
    • Exercise 7.03: Writing an Array of Users to a CSV File
    • Exercise 7.03: Writing an Array of Users to a CSV File
    • Service Objects
    • Exercise 7.04: Building a Service Object
    • Exercise 7.04: Building a Service Object
    • Activity 7.01: Presenting Voting Data in CSV Format Using Ruby Gems
    • Summary
  • 8. Debugging with Ruby

    • Overview
    • Logging and Debugging
    • Basic Logging
    • Exercise 8.01: Logging User Information
    • Exercise 8.01: Logging User Information
    • Exercise 8.02: Creating a Basic Exception Logger
    • Exercise 8.02: Creating a Basic Exception Logger
    • Setting Log Levels by String
    • Exercise 8.03: Creating a Rolling Log File
    • Exercise 8.03: Creating a Rolling Log File
    • Debugging
    • Exercise 8.04: Debugging with byebug
    • Exercise 8.04: Debugging with byebug
    • Debugging with Visual Studio Code
    • Exercise 8.05: Debugging with Visual Studio Code
    • Exercise 8.05: Debugging with Visual Studio Code
    • Activity 8.1: Perform Debugging on a Voting Application
    • Summary
    • Survey II
  • 9. Ruby Beyond the Basics I

    • Overview
    • Metaprogramming
    • Exercise 9.01: Building a Simple Calculator
    • Exercise 9.01: Building a Simple Calculator
    • block_given? with Blocks
    • Exercise 9.02: Building a Flight Status Display System
    • Exercise 9.02: Building a Flight Status Display System
    • The proc Object
    • Exercise 9.03: Performing the sum Function on a Range of Numbers
    • Exercise 9.03: Performing the sum Function on a Range of Numbers
    • Exercise 9.04: Calculating Profit Using proc on an Input Price List
    • Exercise 9.04: Calculating Profit Using proc on an Input Price List
    • Exercise 9.05: Creating a Program to Sum a Range of Numbers Using Lambdas
    • Exercise 9.05: Creating a Program to Sum a Range of Numbers Using Lambdas
    • proc versus lambda
    • Activity 9.01: Invoice Generator
    • Summary
  • 10. Ruby Beyond the Basics II

    • Overview
    • Metaprogramming – A Deep Dive
    • Exercise 10.01: Opening the Ruby String Class to Add a New Method to it
    • Exercise 10.01: Opening the Ruby String Class to Add a New Method to it
    • Monkey Patching
    • Exercise 10.02: Using Monkey Patching to Add/Subtract Values
    • Exercise 10.02: Using Monkey Patching to Add/Subtract Values
    • method_missing
    • Exercise 10.03: Managing Ghost Methods for the Company Class
    • Exercise 10.03: Managing Ghost Methods for the Company Class
    • The Define Method
    • Exercise 10.04: Creating a Welcome Message Program Using
    • Exercise 10.04: Creating a Welcome Message Program Using define_method
    • HTTP Requests
    • Exercise 10.05: Creating a Ruby Program to Make a Successful GET Request
    • Exercise 10.05: Creating a Ruby Program to Make a Successful GET Request
    • Status Codes
    • Exercise 10.06: Creating a POST Request Using Ruby
    • Exercise 10.06: Creating a POST Request Using Ruby
    • Exercise 10.07: Creating Your Own Ruby Gem
    • Exercise 10.07: Creating Your Own Ruby Gem
    • Activity 10.01: Implementing GET and POST Data to an External Server
    • Summary
  • 11. Introduction to Ruby on Rails I

    • Overview
    • Generating Our First Rails App
    • Exercise 11.01: Generating a Simple Rails Application
    • Exercise 11.01: Generating a Simple Rails Application
    • Anatomy of a Rails application
    • Exercise 11.02: Replacing the Default Page
    • Exercise 11.02: Replacing the Default Page
    • Exercise 11.03: Displaying a Page Heading from the Value Served from Its Action
    • Exercise 11.03: Displaying a Page Heading from the Value Served from Its Action
    • Exercise 11.04: Adding a Resource to the Rails Application
    • Exercise 11.04: Adding a Resource to the Rails Application
    • Models, Migrations, and Databases
    • Exercise 11.05: Creating a Review Model for CitiReview
    • Exercise 11.05: Creating a Review Model for CitiReview
    • The Rails Console
    • Exercise 11.06: Completing the Reviews Web Application
    • Exercise 11.06: Completing the Reviews Web Application
    • Activity 11.01: Adding Authentication for the Review Application
    • Summary
    • Survey III
  • 12. Introduction to Ruby on Rails II

    • Overview
    • Associations
    • Exercise 12.01: Creating a Model to Enable Users to Comment on Reviews on the CitiReview Application
    • Exercise 12.01: Creating a Model to Enable Users to Comment on Reviews on the CitiReview Application
    • Validations
    • Exercise 12.02: Adding Validation for the CitiReview Application
    • Exercise 12.02: Adding Validation for the CitiReview Application
    • Exercise 12.03: Using Rails Scaffolding to Create a Rails Application for a Store with a List of Products
    • Exercise 12.03: Using Rails Scaffolding to Create a Rails Application for a Store with a List of Products
    • Activity 12.01: Create a Blog Application and Host It Live on a Cloud Platform
    • Summary
  • Activity Solutions

    • Activity 1.01: Generating Email Addresses Using Ruby Solution
    • Activity 1.01: Generating Email Addresses Using Ruby
    • Activity 1.02: Calculating the Area and Perimeter of a Candy Manufacturing Plant
    • Activity 1.02: Calculating the Area and Perimeter of a Candy Manufacturing Plant
    • Activity 2.01: Dice Roller Program
    • Activity 2.01: Dice Roller Program
    • Activity 3.01: Number-Guessing Game
    • Activity 3.01: Number-Guessing Game
    • Activity 4.01: Blackjack Card Game
    • Activity 4.01: Blackjack Card Game
    • Activity 5.01: Voting Application for Employee of the Month
    • Activity 5.01: Voting Application for Employee of the Month
    • Activity 6.01: Implementing Categories on the Voting Application Program
    • Activity 6.01: Implementing Categories on the Voting Application Program
    • Activity 7.01: Presenting Voting Data in CSV Format Using Ruby Gems
    • Activity 7.01: Presenting Voting Data in CSV Format Using Ruby Gems
    • Activity 8.1: Perform Debugging on a Voting Application
    • Activity 8.1: Perform Debugging on a Voting Application
    • Activity 9.01: Invoice Generator
    • Activity 9.01: Invoice Generator
    • Activity 10.01: Implementing GET and POST Data to an External Server
    • Activity 10.01: Implementing GET and POST Data to an External Server
    • Activity 11.01: Adding Authentication for the Review Application
    • Activity 11.01: Adding Authentication for the Review Application
    • Activity 12.01: Create a Blog Application and Host It Live on a Cloud Platform
    • Activity 12.01: Create a Blog Application and Host It Live on a Cloud Platform

Get Verified

Complete The Ruby Workshop to unlock your certificate.

You can unlock the certificate by completing the course. The credentials are easy to share, and are ideal for displaying on your LinkedIn profile.
A copy of a certificate for The Ruby Workshop

Take A Step Forward

There has never been a better time to start learning Ruby.

  • $34.99

    $34.99The Ruby Workshop

    Unlock one year of full, unlimited access and get started right away!
    Learn for Free

Already Know Ruby?

Don't worry, we've got your back with other languages and frameworks too!

Show me my options!