Skip to content

Commit bbfb933

Browse files
authored
Update default Ruby version to 3.3.8 (heroku#1595)
* Update default Ruby version to 3.3.8 Also updates the "bootstrap" version of Ruby that the buildpack uses to run itself to match the default version. Previously, it was pinned to 3.1.x due to needing to support Bundler 1.x for the heroku-20. * Fix error difference ``` expected ArgumentError, got #<Encoding::CompatibilityError:"invalid byte sequence in UTF-8\n Invalid string: ACENOCUMAROL,AZECAR,1 MG 30 COMPRIMIDOS, \xF1\xF1\xF3\xE9n\xF1\r\n"> with backtrace: # ./spec/helpers/shell_spec.rb:73:in `strip' # ./spec/helpers/shell_spec.rb:73:in `print' ``` We don't need to rely on the error class, as we are asserting against the message.
1 parent ea5df15 commit bbfb933

8 files changed

Lines changed: 31 additions & 8 deletions

File tree

.github/workflows/hatchet_app_cleaner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: ruby/setup-ruby@v1
2525
with:
2626
bundler-cache: true
27-
ruby-version: "3.1.6"
27+
ruby-version: "3.3.8"
2828
- name: Run Hatchet destroy
2929
# Only apps older than 10 minutes are destroyed, to ensure that any
3030
# in progress CI runs are not interrupted.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [Unreleased]
44

5+
- Default Ruby version is now 3.3.8 (https://github.com/heroku/heroku-buildpack-ruby/pull/1595)
56

67
## [v308] - 2025-05-15
78

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source "https://rubygems.org"
22
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

4-
ruby "3.1.6"
4+
ruby "3.3.8"
55

66
group :development, :test do
77
gem "toml-rb"

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ DEPENDENCIES
7575
toml-rb
7676

7777
RUBY VERSION
78-
ruby 3.1.6p260
78+
ruby 3.3.8p144
7979

8080
BUNDLED WITH
81-
2.5.11
81+
2.5.22

buildpack.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[buildpack]
22
name = "Ruby"
3-
ruby_version = "3.1.6"
3+
ruby_version = "3.3.8"
44

55
[publish.Ignore]
66
files = [
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Default Ruby version for new apps is now 3.3.8
2+
3+
The [default Ruby version for new Ruby applications is 3.3.8](https://devcenter.heroku.com/articles/ruby-support#default-ruby-version-for-new-apps). You’ll only get the default if the application does not specify a ruby version.
4+
5+
Heroku highly recommends specifying your desired Ruby version. You can specify a Ruby version in your `Gemfile:
6+
7+
```term
8+
ruby "3.3.8"
9+
```
10+
11+
Once you have a Ruby version specified in your `Gemfile`, update the `Gemfile.lock` by running the following command:
12+
13+
```term
14+
$ bundle update --ruby
15+
```
16+
17+
Make sure you commit the results to git before attempting to deploy again:
18+
19+
```term
20+
$ git add Gemfile Gemfile.lock
21+
$ git commit -m "update ruby version"
22+
```

lib/language_pack/ruby_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def initialize(output = "")
1212
end
1313
end
1414

15-
BOOTSTRAP_VERSION_NUMBER = "3.1.6".freeze
16-
DEFAULT_VERSION_NUMBER = "3.3.7".freeze
15+
BOOTSTRAP_VERSION_NUMBER = "3.3.8".freeze
16+
DEFAULT_VERSION_NUMBER = "3.3.8".freeze
1717
DEFAULT_VERSION = "ruby-#{DEFAULT_VERSION_NUMBER}".freeze
1818
RUBY_VERSION_REGEX = %r{
1919
(?<ruby_version>\d+\.\d+\.\d+){0}

spec/helpers/shell_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def sh.print(string)
7474
end
7575

7676
bad_lines = File.read("spec/fixtures/invalid_encoding.log")
77-
expect { sh.puts(bad_lines) }.to raise_error(ArgumentError) do |error|
77+
expect { sh.puts(bad_lines) }.to raise_error do |error|
7878
expect(error.message).to include("Invalid string:")
7979
end
8080
end

0 commit comments

Comments
 (0)