From 412388eff8c820403792bb4445f74352aac5b12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= Date: Wed, 22 Jan 2025 20:49:16 +0100 Subject: [PATCH] Upgrade Ruby versions in ruby Gemfile guide. --- source/guides/gemfile_ruby.html.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/guides/gemfile_ruby.html.md b/source/guides/gemfile_ruby.html.md index 2f6f4b553c..4eca35d9d4 100644 --- a/source/guides/gemfile_ruby.html.md +++ b/source/guides/gemfile_ruby.html.md @@ -13,16 +13,16 @@ ruby 'RUBY_VERSION', :engine => 'ENGINE', :engine_version => 'ENGINE_VERSION', :patchlevel => 'RUBY_PATCHLEVEL' ~~~ -If you wanted to use JRuby 1.6.7 using Ruby 1.9.3, you would simply do the following: +If you wanted to use JRuby 9.4.10.0 using Ruby 3.1.4, you would simply do the following: ~~~ruby -ruby '1.9.3', :engine => 'jruby', :engine_version => '1.6.7' +ruby '3.1.4', :engine => 'jruby', :engine_version => '9.4.10.0' ~~~ It's also possible to restrict the patchlevel of the Ruby used by doing the following: ~~~ruby -ruby '1.9.3', :patchlevel => '448' +ruby '3.3.6', :patchlevel => '108' ~~~ If you wish to derive your Ruby version from a version file (i.e. `.ruby-version`), @@ -35,12 +35,14 @@ ruby file: ".ruby-version" The version file should conform to any of the following formats: - `3.1.2` (`.ruby-version`) +- `ruby-3.1.2` (`.ruby-version`) - `ruby 3.1.2` ([`.tool-versions`](https://asdf-vm.com/manage/configuration.html#tool-versions)) +- `ruby = '3.1.2'` ([`mise.toml`](https://mise.jdx.dev/dev-tools/)) Bundler will make checks against the current running Ruby VM to make sure it matches what is specified in the `Gemfile`. If things don't match, Bundler will raise an Exception explaining what doesn't match. ~~~ -Your Ruby version is 1.8.7, but your Gemfile specified 1.9.3 +Your Ruby version is 3.3.7, but your Gemfile specified 3.4.1 ~~~ Both `:engine` and `:engine_version` are optional. @@ -49,7 +51,7 @@ When `:engine` is used, `:engine_version` must also be specified. Using the `platform` command with the `--ruby` flag, you can see what `ruby` directive is specified in the `Gemfile`. ~~~ -ruby 1.9.3 (jruby 1.6.7) +ruby 3.1.4p0 (jruby 9.4.10.0) ~~~ Learn More: bundle platform @@ -60,7 +62,7 @@ Version operators for specifying a Ruby version are also available. The set of supported version operators is that of Rubygems (`gem` version operators). (ie. `<`, `>`, `<=`, `>=`, `~>`, `=`) ~~~ruby -ruby '~> 2.3.0' +ruby '~> 3.3.0' ~~~ Learn More: Version Operators