This repository contains ruby-build definitions of Rubies we use at Shopify. These builds are API compliant with release Rubies, but with additional backports for bugfixes and performance.
If you use rbenv, you can add the custom rubies with:
$ gem install shopify-ruby-definitions
$ eval "$(shopify-ruby env)"If you are using another ruby version manager or no manager at all:
-
Install ruby-build by following the instructions.
-
Install the gem:
$ gem install shopify-ruby-definitions
-
List the custom Ruby versions available:
$ shopify-ruby versions 3.0.0-pshopify9 3.0.1-pshopify2 3.0.2-pshopify3 3.1.0-pshopify1 3.1.1-pshopify2 3.1.2-pshopify2 3.1.3-pshopify1 3.1.4-pshopify1 3.2.0-pshopify2 3.2.1-pshopify5 3.2.2-pshopify3 3.2.2-pshopify4
-
Install the Ruby version you want, options are the same than regular
ruby-build:$ shopify-ruby build 3.2.2-pshopify4 ~/.rubies/versions/3.2.2 -
Resolve a less specific version to one of these definitions
$ shopify-ruby resolve 3.2 $ shopify-ruby resolve 3.2 3.2.2-pshopify4
A rake task automates the creation of new pshopify definition files:
$ rake pshopify:create # uses latest stable Ruby from ruby-build
$ rake "pshopify:create[4.0.2]" # uses a specific versionThis will:
- Default to the latest stable CRuby version if none is specified
- Determine the next pshopify number (e.g.
4.0.2-pshopify2if4.0.2-pshopify1already exists) - Verify the branch exists on Shopify/ruby
- Read the openssl line from the upstream ruby-build definition
- Fetch the changelog from the GitHub compare API
- Generate the definition file in
rubies/
- The
ghCLI must be installed and authenticated - A local ruby-build checkout must be available. The task searches for sibling directories matching
*ruby-build, or you can setRUBY_BUILD_PATH:
$ RUBY_BUILD_PATH=~/src/ruby-build rake "pshopify:create[4.0.2]"