Skip to content

Commit 6d43b7e

Browse files
authored
[rails] Upgrade to Rails 8. (#9446)
1 parent cd14f4a commit 6d43b7e

File tree

6 files changed

+127
-141
lines changed

6 files changed

+127
-141
lines changed

frameworks/Ruby/rails/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
gem 'rails', '~> 7.2.0'
3+
gem 'rails', '~> 8.0.0'
44
gem 'redis', '~> 5.0'
55
gem 'tzinfo-data'
66

frameworks/Ruby/rails/Gemfile.lock

Lines changed: 89 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.2.1.1)
5-
actionpack (= 7.2.1.1)
6-
activesupport (= 7.2.1.1)
4+
actioncable (8.0.0)
5+
actionpack (= 8.0.0)
6+
activesupport (= 8.0.0)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.2.1.1)
11-
actionpack (= 7.2.1.1)
12-
activejob (= 7.2.1.1)
13-
activerecord (= 7.2.1.1)
14-
activestorage (= 7.2.1.1)
15-
activesupport (= 7.2.1.1)
10+
actionmailbox (8.0.0)
11+
actionpack (= 8.0.0)
12+
activejob (= 8.0.0)
13+
activerecord (= 8.0.0)
14+
activestorage (= 8.0.0)
15+
activesupport (= 8.0.0)
1616
mail (>= 2.8.0)
17-
actionmailer (7.2.1.1)
18-
actionpack (= 7.2.1.1)
19-
actionview (= 7.2.1.1)
20-
activejob (= 7.2.1.1)
21-
activesupport (= 7.2.1.1)
17+
actionmailer (8.0.0)
18+
actionpack (= 8.0.0)
19+
actionview (= 8.0.0)
20+
activejob (= 8.0.0)
21+
activesupport (= 8.0.0)
2222
mail (>= 2.8.0)
2323
rails-dom-testing (~> 2.2)
24-
actionpack (7.2.1.1)
25-
actionview (= 7.2.1.1)
26-
activesupport (= 7.2.1.1)
24+
actionpack (8.0.0)
25+
actionview (= 8.0.0)
26+
activesupport (= 8.0.0)
2727
nokogiri (>= 1.8.5)
28-
racc
29-
rack (>= 2.2.4, < 3.2)
28+
rack (>= 2.2.4)
3029
rack-session (>= 1.0.1)
3130
rack-test (>= 0.6.3)
3231
rails-dom-testing (~> 2.2)
3332
rails-html-sanitizer (~> 1.6)
3433
useragent (~> 0.16)
35-
actiontext (7.2.1.1)
36-
actionpack (= 7.2.1.1)
37-
activerecord (= 7.2.1.1)
38-
activestorage (= 7.2.1.1)
39-
activesupport (= 7.2.1.1)
34+
actiontext (8.0.0)
35+
actionpack (= 8.0.0)
36+
activerecord (= 8.0.0)
37+
activestorage (= 8.0.0)
38+
activesupport (= 8.0.0)
4039
globalid (>= 0.6.0)
4140
nokogiri (>= 1.8.5)
42-
actionview (7.2.1.1)
43-
activesupport (= 7.2.1.1)
41+
actionview (8.0.0)
42+
activesupport (= 8.0.0)
4443
builder (~> 3.1)
4544
erubi (~> 1.11)
4645
rails-dom-testing (~> 2.2)
4746
rails-html-sanitizer (~> 1.6)
48-
activejob (7.2.1.1)
49-
activesupport (= 7.2.1.1)
47+
activejob (8.0.0)
48+
activesupport (= 8.0.0)
5049
globalid (>= 0.3.6)
51-
activemodel (7.2.1.1)
52-
activesupport (= 7.2.1.1)
53-
activerecord (7.2.1.1)
54-
activemodel (= 7.2.1.1)
55-
activesupport (= 7.2.1.1)
50+
activemodel (8.0.0)
51+
activesupport (= 8.0.0)
52+
activerecord (8.0.0)
53+
activemodel (= 8.0.0)
54+
activesupport (= 8.0.0)
5655
timeout (>= 0.4.0)
57-
activestorage (7.2.1.1)
58-
actionpack (= 7.2.1.1)
59-
activejob (= 7.2.1.1)
60-
activerecord (= 7.2.1.1)
61-
activesupport (= 7.2.1.1)
56+
activestorage (8.0.0)
57+
actionpack (= 8.0.0)
58+
activejob (= 8.0.0)
59+
activerecord (= 8.0.0)
60+
activesupport (= 8.0.0)
6261
marcel (~> 1.0)
63-
activesupport (7.2.1.1)
62+
activesupport (8.0.0)
6463
base64
64+
benchmark (>= 0.3)
6565
bigdecimal
6666
concurrent-ruby (~> 1.0, >= 1.3.1)
6767
connection_pool (>= 2.2.5)
@@ -71,14 +71,15 @@ GEM
7171
minitest (>= 5.1)
7272
securerandom (>= 0.3)
7373
tzinfo (~> 2.0, >= 2.0.5)
74+
uri (>= 0.13.1)
7475
agoo (2.15.13)
75-
async (2.17.0)
76-
console (~> 1.26)
76+
async (2.19.0)
77+
console (~> 1.29)
7778
fiber-annotation
7879
io-event (~> 1.6, >= 1.6.5)
7980
async-container (0.18.3)
8081
async (~> 2.10)
81-
async-http (0.82.1)
82+
async-http (0.82.3)
8283
async (>= 2.10.2)
8384
async-pool (~> 0.9)
8485
io-endpoint (~> 0.14)
@@ -97,16 +98,17 @@ GEM
9798
async
9899
async-container (~> 0.16)
99100
base64 (0.2.0)
101+
benchmark (0.4.0)
100102
bigdecimal (3.1.8)
101103
builder (3.3.0)
102104
concurrent-ruby (1.3.4)
103105
connection_pool (2.4.1)
104-
console (1.27.0)
106+
console (1.29.0)
105107
fiber-annotation
106108
fiber-local (~> 1.1)
107109
json
108110
crass (1.0.6)
109-
date (3.3.4)
111+
date (3.4.1)
110112
drb (2.2.1)
111113
erubi (1.13.0)
112114
falcon (0.48.3)
@@ -130,16 +132,16 @@ GEM
130132
activesupport (>= 6.1)
131133
i18n (1.14.6)
132134
concurrent-ruby (~> 1.0)
133-
io-console (0.7.2)
135+
io-console (0.8.0)
134136
io-endpoint (0.14.0)
135-
io-event (1.7.2)
136-
io-stream (0.6.0)
137+
io-event (1.7.3)
138+
io-stream (0.6.1)
137139
irb (1.14.1)
138140
rdoc (>= 4.0.0)
139141
reline (>= 0.4.2)
140142
json (2.8.1)
141143
localhost (1.3.1)
142-
logger (1.6.1)
144+
logger (1.6.2)
143145
loofah (2.23.1)
144146
crass (~> 1.0.2)
145147
nokogiri (>= 1.12.0)
@@ -150,11 +152,11 @@ GEM
150152
net-smtp
151153
mapping (1.1.1)
152154
marcel (1.0.4)
153-
metrics (0.12.0)
155+
metrics (0.12.1)
154156
mini_mime (1.1.5)
155157
mini_portile2 (2.8.8)
156-
minitest (5.25.1)
157-
net-imap (0.4.17)
158+
minitest (5.25.4)
159+
net-imap (0.5.1)
158160
date
159161
net-protocol
160162
net-pop (0.1.2)
@@ -167,27 +169,29 @@ GEM
167169
nokogiri (1.16.8)
168170
mini_portile2 (~> 2.8.2)
169171
racc (~> 1.4)
170-
nokogiri (1.16.8-arm64-darwin)
172+
nokogiri (1.16.8-x86_64-darwin)
171173
racc (~> 1.4)
172174
nokogiri (1.16.8-x86_64-linux)
173175
racc (~> 1.4)
174176
openssl (3.2.0)
175-
pg (1.5.8)
177+
pg (1.5.9)
176178
process-metrics (0.3.0)
177179
console (~> 1.8)
178180
json (~> 2)
179181
samovar (~> 2.1)
180182
protocol-hpack (1.5.1)
181-
protocol-http (0.40.0)
183+
protocol-http (0.42.0)
182184
protocol-http1 (0.28.1)
183185
protocol-http (~> 0.22)
184-
protocol-http2 (0.19.3)
186+
protocol-http2 (0.19.4)
185187
protocol-hpack (~> 1.4)
186188
protocol-http (~> 0.18)
189+
traces
187190
protocol-rack (0.10.1)
188191
protocol-http (~> 0.37)
189192
rack (>= 1.0)
190-
psych (5.1.2)
193+
psych (5.2.1)
194+
date
191195
stringio
192196
puma (6.5.0)
193197
nio4r (~> 2.0)
@@ -197,70 +201,69 @@ GEM
197201
rack (>= 3.0.0)
198202
rack-test (2.1.0)
199203
rack (>= 1.3)
200-
rackup (2.1.0)
204+
rackup (2.2.1)
201205
rack (>= 3)
202-
webrick (~> 1.8)
203-
rails (7.2.1.1)
204-
actioncable (= 7.2.1.1)
205-
actionmailbox (= 7.2.1.1)
206-
actionmailer (= 7.2.1.1)
207-
actionpack (= 7.2.1.1)
208-
actiontext (= 7.2.1.1)
209-
actionview (= 7.2.1.1)
210-
activejob (= 7.2.1.1)
211-
activemodel (= 7.2.1.1)
212-
activerecord (= 7.2.1.1)
213-
activestorage (= 7.2.1.1)
214-
activesupport (= 7.2.1.1)
206+
rails (8.0.0)
207+
actioncable (= 8.0.0)
208+
actionmailbox (= 8.0.0)
209+
actionmailer (= 8.0.0)
210+
actionpack (= 8.0.0)
211+
actiontext (= 8.0.0)
212+
actionview (= 8.0.0)
213+
activejob (= 8.0.0)
214+
activemodel (= 8.0.0)
215+
activerecord (= 8.0.0)
216+
activestorage (= 8.0.0)
217+
activesupport (= 8.0.0)
215218
bundler (>= 1.15.0)
216-
railties (= 7.2.1.1)
219+
railties (= 8.0.0)
217220
rails-dom-testing (2.2.0)
218221
activesupport (>= 5.0.0)
219222
minitest
220223
nokogiri (>= 1.6)
221224
rails-html-sanitizer (1.6.1)
222225
loofah (~> 2.21)
223226
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
224-
railties (7.2.1.1)
225-
actionpack (= 7.2.1.1)
226-
activesupport (= 7.2.1.1)
227+
railties (8.0.0)
228+
actionpack (= 8.0.0)
229+
activesupport (= 8.0.0)
227230
irb (~> 1.13)
228231
rackup (>= 1.0.0)
229232
rake (>= 12.2)
230233
thor (~> 1.0, >= 1.2.2)
231234
zeitwerk (~> 2.6)
232235
rake (13.2.1)
233-
rdoc (6.7.0)
236+
rdoc (6.8.1)
234237
psych (>= 4.0.0)
235238
redis (5.3.0)
236239
redis-client (>= 0.22.0)
237240
redis-client (0.22.2)
238241
connection_pool
239-
reline (0.5.10)
242+
reline (0.5.12)
240243
io-console (~> 0.5)
241244
samovar (2.3.0)
242245
console (~> 1.0)
243246
mapping (~> 1.0)
244-
securerandom (0.3.1)
245-
stringio (3.1.1)
247+
securerandom (0.4.0)
248+
stringio (3.1.2)
246249
thor (1.3.2)
247-
timeout (0.4.1)
248-
traces (0.13.1)
250+
timeout (0.4.2)
251+
traces (0.14.1)
249252
trilogy (2.8.1)
250253
tzinfo (2.0.6)
251254
concurrent-ruby (~> 1.0)
252255
tzinfo-data (1.2024.2)
253256
tzinfo (>= 1.0.0)
254-
useragent (0.16.10)
255-
webrick (1.8.2)
257+
uri (1.0.2)
258+
useragent (0.16.11)
256259
websocket-driver (0.7.6)
257260
websocket-extensions (>= 0.1.0)
258261
websocket-extensions (0.1.5)
259-
zeitwerk (2.7.0)
262+
zeitwerk (2.7.1)
260263

261264
PLATFORMS
262-
arm64-darwin-20
263265
ruby
266+
x86_64-darwin-22
264267
x86_64-linux
265268

266269
DEPENDENCIES
@@ -269,10 +272,10 @@ DEPENDENCIES
269272
pg (~> 1.5)
270273
puma (~> 6.4)
271274
rackup
272-
rails (~> 7.2.0)
275+
rails (~> 8.0.0)
273276
redis (~> 5.0)
274277
trilogy (~> 2.8.1)
275278
tzinfo-data
276279

277280
BUNDLED WITH
278-
2.3.3
281+
2.5.16

frameworks/Ruby/rails/config/environments/development.rb

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
Rails.application.configure do
44
# Settings specified here will take precedence over those in config/application.rb.
55

6-
# In the development environment your application's code is reloaded any time
7-
# it changes. This slows down response time but is perfect for development
8-
# since you don't have to restart the web server when you make code changes.
6+
# Make code changes take effect immediately without server restart.
97
config.enable_reloading = true
108

119
# Do not eager load code on boot.
@@ -17,35 +15,31 @@
1715
# Enable server timing.
1816
config.server_timing = true
1917

20-
# Enable/disable caching. By default caching is disabled.
21-
# Run rails dev:cache to toggle caching.
18+
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
19+
# Run rails dev:cache to toggle Action Controller caching.
2220
if Rails.root.join("tmp/caching-dev.txt").exist?
2321
config.action_controller.perform_caching = true
2422
config.action_controller.enable_fragment_cache_logging = true
25-
26-
config.cache_store = :memory_store
27-
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
23+
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
2824
else
2925
config.action_controller.perform_caching = false
30-
31-
config.cache_store = :null_store
3226
end
3327

28+
# Change to :null_store to avoid any caching.
29+
config.cache_store = :memory_store
30+
3431
# Print deprecation notices to the Rails logger.
3532
config.active_support.deprecation = :log
3633

37-
# Raise exceptions for disallowed deprecations.
38-
config.active_support.disallowed_deprecation = :raise
39-
40-
# Tell Active Support which deprecation messages to disallow.
41-
config.active_support.disallowed_deprecation_warnings = []
42-
4334
# Raise an error on page load if there are pending migrations.
4435
config.active_record.migration_error = :page_load
4536

4637
# Highlight code that triggered database queries in logs.
4738
config.active_record.verbose_query_logs = true
4839

40+
# Append comments with runtime information tags to SQL queries in logs.
41+
config.active_record.query_log_tags_enabled = true
42+
4943
# Raises error for missing translations.
5044
# config.i18n.raise_on_missing_translations = true
5145

@@ -54,7 +48,4 @@
5448

5549
# Raise error when a before_action's only/except options reference missing actions.
5650
config.action_controller.raise_on_missing_callback_actions = true
57-
58-
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
59-
# config.generators.apply_rubocop_autocorrect_after_generate!
6051
end

0 commit comments

Comments
 (0)