Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Ruby Hacker Box


The Ruby Hacker Box is meant to make it easy for new Ruby hackers to get started hacking Ruby very quickly.

It was started at @ko1's Ruby Hack Challenge and is based on the documentation that was written for those events.


  • Docker
  • git
  • For the time being, documentation and scripts exists only for Unix shells.


You have two options to install: running the boostrap script or manually following the install instructions.


You can get started by just pasting the following line in your command line:

curl -s | sh /dev/stdin


  1. Clone this repository.
git clone
  1. Clone the Ruby source repository inside this repository.
git clone mri-dev-docker/ruby

You can also copy your own ruby source folder in mri-dev-docker if you already have it.

  1. Run the setup script
cd mri-dev-docker

Getting started

You can open a Bash prompt in the Docker container you just built by using the start script:


(This is just a shortcut to run the docker run command with the proper options.)

The files are structured as described in @ko1's Build MRI and install built binaries.

They are organised as follows:

├── ruby/
└── workdir/
    ├── build/
    ├── install/
    └── ruby -> /ruby
  • /ruby/ contains the Ruby source code, as a Docker volume mounted from the host's ruby directory that was checked out from GitHub during setup
  • /workdir/ is your working directory, containing:
    • the build/ directory (*.o and other artifacts)
    • the install/ directory (in which you can find the compiled bin/ruby)
    • a symbolic link to /ruby, for convenience

Once in the Docker's shell, you can start hacking Ruby, then use make to build from the source, and for example, run tests:

make btest
make test-all
make test-spec

You can also run /ruby/test.rb using miniruby with make run.

About volumes

Note that ruby/ is not mounted directly inside /workdir to allow Docker to manage both directories as separate volumes, respectively mounted to your host ruby directory, and to a Docker volume that will backup build changes between sessions.

Thanks to that, it is possible to hack at Ruby's source code from the host, using your favorite tool suite. Build steps only will have to happen inside the Docker container's shell.


A Docker image to get started hacking Ruby






No releases published


No packages published