|
1 | 1 | # shopify-ruby-definitions
|
2 | 2 |
|
3 |
| -This repository contains [ruby-build](https://github.com/rbenv/ruby-build/) definitions of Rubies we use at Shopify. These builds are generally API complient with release Rubies, but with additional backports for bugfixes and performance. |
| 3 | +This repository contains [ruby-build](https://github.com/rbenv/ruby-build/) definitions of Rubies we use at Shopify. |
| 4 | +These builds are API complient with release Rubies, but with additional backports for bugfixes and performance. |
4 | 5 |
|
5 |
| -## Quick start |
| 6 | +## rbenv integration |
| 7 | + |
| 8 | +If you use `rbenv`, you can add the custom rubies with: |
| 9 | + |
| 10 | +```bash |
| 11 | +$ gem install shopify-ruby-definitions |
| 12 | +$ eval "$(shopify-ruby env)" |
| 13 | +``` |
| 14 | + |
| 15 | +## standalone ruby-build |
| 16 | + |
| 17 | +If you are using another ruby version manager or no manager at all: |
6 | 18 |
|
7 | 19 | 1. Install ruby-build by [following the instructions](https://github.com/rbenv/ruby-build/#installation).
|
8 |
| -1. Install the gem: |
9 |
| - ``` |
| 20 | + |
| 21 | +2. Install the gem: |
| 22 | + ```bash |
10 | 23 | $ gem install shopify-ruby-definitions
|
11 | 24 | ```
|
12 |
| -1. Acquire the specific Ruby version of the Ruby version you want to install. Ruby 3.2 is used as an example here: |
13 |
| - ``` |
14 |
| - $ export RUBY_VERSION=`ruby -rshopify_ruby_definitions -e 'puts ShopifyRubyDefinitions.resolve_version("3.2")'` |
15 |
| - ``` |
16 |
| -1. Set the definitions path for ruby-build: |
17 |
| - ``` |
18 |
| - $ export RUBY_BUILD_DEFINITIONS=`ruby -rshopify_ruby_definitions -e 'puts ShopifyRubyDefinitions::RubyVersions::VERSIONS_DIRECTORY'` |
19 |
| - ``` |
20 |
| -1. Install the Ruby version using ruby-build: |
| 25 | + |
| 26 | +3. List the custom Ruby versions available: |
| 27 | + ```bash |
| 28 | + $ shopify-ruby versions |
| 29 | + 3.0.0-pshopify9 |
| 30 | + 3.0.1-pshopify2 |
| 31 | + 3.0.2-pshopify3 |
| 32 | + 3.1.0-pshopify1 |
| 33 | + 3.1.1-pshopify2 |
| 34 | + 3.1.2-pshopify2 |
| 35 | + 3.1.3-pshopify1 |
| 36 | + 3.1.4-pshopify1 |
| 37 | + 3.2.0-pshopify2 |
| 38 | + 3.2.1-pshopify5 |
| 39 | + 3.2.2-pshopify3 |
| 40 | + 3.2.2-pshopify4 |
21 | 41 | ```
|
22 |
| - ruby-build $RUBY_VERSION |
| 42 | + |
| 43 | +4. Install the Ruby version you want, [options are the same than regular `ruby-build`](https://github.com/rbenv/ruby-build#advanced-usage): |
| 44 | + ```bash |
| 45 | + $ shopify-ruby build 3.2.2-pshopify4 ~/.rubies/versions/3.2.2 |
23 | 46 | ```
|
0 commit comments