Skip to content

Commit 68c6e33

Browse files
committed
Updates for Rails v8.1
1 parent a199ded commit 68c6e33

5 files changed

Lines changed: 15 additions & 14 deletions

File tree

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- Updated the grade breakdown summary table to use `@tanstack/react-table` v8 (#7800)
2727
- Internationalized custom model validation error messages by replacing hardcoded English strings with i18n symbol keys (#7805)
2828
- Changed model validation errors to use built-in error key resolution instead of inline `I18n.t` calls (#7806)
29+
- Upgraded to Rails v8.1 (#7815)
2930

3031
## [v2.9.2]
3132

bin/dev

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env ruby
2-
exec "./bin/rails", "server", *ARGV
2+
exec './bin/rails', 'server', *ARGV

bin/setup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ FileUtils.chdir APP_ROOT do
2222

2323
puts '\n== Preparing database =='
2424
system! 'bin/rails db:prepare'
25+
system! 'bin/rails db:reset' if ARGV.include?('--reset')
2526

2627
puts '\n== Removing old logs and tempfiles =='
2728
system! 'bin/rails log:clear tmp:clear'

config/application.rb

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
module Markus
1818
class Application < Rails::Application
1919
# Initialize configuration defaults for originally generated Rails version
20-
config.load_defaults 8.0
20+
config.load_defaults 8.1
21+
22+
# Please, add to the `ignore` list any other `lib` subdirectories that do
23+
# not contain `.rb` files, or that should not be reloaded or eager loaded.
24+
# Common ones are `templates`, `generators`, or `middleware`, for example.
25+
config.autoload_lib(ignore: %w[jupyter-notebook repo tasks])
2126

2227
# Change the format of the cache entry.
2328
#
@@ -57,16 +62,6 @@ class Application < Rails::Application
5762
# Set conservative Regexp.timeout (Rails default is 1s)
5863
Regexp.timeout = 10
5964

60-
###
61-
# Specifies whether `to_time` methods preserve the UTC offset of their receivers or preserves the timezone.
62-
# If set to `:zone`, `to_time` methods will use the timezone of their receivers.
63-
# If set to `:offset`, `to_time` methods will use the UTC offset.
64-
# If `false`, `to_time` methods will convert to the local system UTC offset instead.
65-
#
66-
# Pre-Rails 8 the default was :offset; Rails 8 makes the default :zone.
67-
#++
68-
config.active_support.to_time_preserves_timezone = :offset
69-
7065
# Settings below are configurable
7166

7267
config.time_zone = Settings.rails.time_zone

config/puma.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
#
88
# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You
99
# should only set this value when you want to run 2 or more workers. The
10-
# default is already 1.
10+
# default is already 1. You can set it to `auto` to automatically start a worker
11+
# for each available processor.
1112
#
1213
# The ideal number of threads per worker depends both on how much time the
1314
# application spends waiting for IO operations and on how much you wish to
@@ -18,6 +19,9 @@
1819
# Global VM Lock (GVL) it has diminishing returns and will degrade the
1920
# response time (latency) of the application.
2021
#
22+
# The default is set to 3 threads as it's deemed a decent compromise between
23+
# throughput and latency for the average Rails application.
24+
#
2125
# Any libraries that use a connection pool or another resource pool should
2226
# be configured to provide at least as many connections as the number of
2327
# threads. This includes Active Record's `pool` parameter in `database.yml`.
@@ -33,7 +37,7 @@
3337
plugin :tmp_restart
3438

3539
# Run the Solid Queue supervisor inside of Puma for single-server deployments
36-
# plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
40+
plugin :solid_queue if ENV['SOLID_QUEUE_IN_PUMA']
3741

3842
# Specify the PID file. Defaults to tmp/pids/server.pid in development.
3943
# In other environments, only set the PID file if requested.

0 commit comments

Comments
 (0)