Skip to content

Commit e77cf6e

Browse files
authored
Merge pull request #1583 from rubymonsters/upgrade-ruby-3.4
Upgrade to ruby 3.4
2 parents 6835469 + bc68955 commit e77cf6e

6 files changed

Lines changed: 30 additions & 7 deletions

File tree

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.3.10
1+
ruby 3.4.9

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.3.10
1+
FROM ruby:3.4.9
22
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
33
RUN mkdir /speakerinnen_liste
44
WORKDIR /speakerinnen_liste

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
source 'https://rubygems.org'
4-
ruby '3.3.10'
4+
ruby '3.4.9'
55
gem 'rails', '~> 8.0.0'
66

77
# Needed for Javascript Runtime

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ GEM
195195
railties (>= 5.0.0)
196196
faker (3.5.1)
197197
i18n (>= 1.8.11, < 2)
198-
ffi (1.17.0-aarch64-linux-gnu)
199-
ffi (1.17.0-arm64-darwin)
200-
ffi (1.17.0-x86_64-linux-gnu)
198+
ffi (1.17.4-aarch64-linux-gnu)
199+
ffi (1.17.4-arm64-darwin)
200+
ffi (1.17.4-x86_64-linux-gnu)
201201
font-awesome-sass (6.7.2)
202202
sassc (~> 2.0)
203203
formatador (1.1.0)
@@ -575,7 +575,7 @@ DEPENDENCIES
575575
webrick (~> 1.7)
576576

577577
RUBY VERSION
578-
ruby 3.3.10
578+
ruby 3.4.9
579579

580580
BUNDLED WITH
581581
4.0.2

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,22 @@ Find further details in [CONTRIBUTING.md](CONTRIBUTING.md).
118118

119119
## Docker
120120

121+
### Use upgraded Ruby version in Docker
122+
123+
If the Ruby version is upgraded (in `Gemfile`, `Dockerfile`, and `.tool-versions`), you need to rebuild the Docker image so the container uses the new version:
124+
125+
```
126+
make setup
127+
```
128+
129+
If you switch between branches with different Ruby versions, run `make setup` again after switching to rebuild the image for that branch.
130+
131+
**Without Docker:** If you develop locally using asdf instead of Docker, you don't need to rebuild any image. Just install the Ruby version and run `bundle install`:
132+
```
133+
asdf install ruby <version>
134+
bundle install
135+
```
136+
121137
### Use upgraded Postgres version in Docker
122138
If Postgres got upgraded in the docker-compose file, you need to delete all processes, images
123139
and volumes that still use the older version:

config/environments/development.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
Bullet.bullet_logger = true
7979
Bullet.console = true
8080
Bullet.rails_logger = true
81+
# In development, profile images are replaced with a static avatar (see profile_image_link helper),
82+
# so ActiveStorage associations are never accessed. They are still needed in production.
83+
Bullet.add_safelist type: :unused_eager_loading, class_name: "Profile", association: :image_attachment
84+
Bullet.add_safelist type: :unused_eager_loading, class_name: "ActiveStorage::Attachment", association: :blob
85+
Bullet.add_safelist type: :unused_eager_loading, class_name: "ActiveStorage::Blob", association: :variant_records
86+
Bullet.add_safelist type: :unused_eager_loading, class_name: "ActiveStorage::Blob", association: :preview_image_attachment
87+
Bullet.add_safelist type: :unused_eager_loading, class_name: "ActiveStorage::VariantRecord", association: :image_attachment
8188
end
8289

8390
# config.action_mailer.delivery_method = :letter_opener

0 commit comments

Comments
 (0)