Enhancing development with REPLs - A practical guide

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Ruby on Rails

    Ruby on Rails

  • On all my application tutorials I start by setting up an application level REPL, it's basically a console script that loads all the files inside your project, if you're using a framework like Ruby on Rails or Hanami you already have a console by running the command console also.

  • zeitwerk

    Efficient and thread-safe code loader for Ruby

  • To setup it's pretty simple, you just need to create a file inside bin/console and require all the files you want to use on a REPL, most of the times we use gems like zeitwerk to provide the auto requiring, but if you want to do it manually, refer to the example below:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • pry-reload

  • The pry-reload gem provide the reload! command to smartly reload your changed code so you can keep iterating over the solution without closing and reopening the REPL as you can see below:

  • Pry

    A runtime developer console and IRB alternative with powerful introspection capabilities.

  • All of my recent tutorials and projects were primarily managed using the default Ruby REPL, irb, and I must say it's been nothing short of amazing. However, what ultimately prompted me to switch to Pry was its offering of better defaults. But what exactly does that mean? Let me demonstrate:

  • pry-rescue

    Start a pry session whenever something goes wrong.

  • Alongside the wide range of gems around the pry REPL we have pry-rescue that allow us to start a debugging REPL as soon as a test fails, that way we can investigate and fix it before waiting for all the other tests to run:

  • Hanami

    The web, with simplicity.

  • On all my application tutorials I start by setting up an application level REPL, it's basically a console script that loads all the files inside your project, if you're using a framework like Ruby on Rails or Hanami you already have a console by running the command console also.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts