diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 16:58:53 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 16:58:53 +0200 |
| commit | 420506e58fdfc84f1a5bede0a01dedf0af3bb4f3 (patch) | |
| tree | 57726b40e8aa9ccf80f874f39d3facefc0331420 /config/puma.rb | |
| parent | 241d5e91b2b6716e2861cc77d319c3d3568343a8 (diff) | |
Stage 7: Rails 7.2 → 8.1 on Ruby 3.2.11
- Bump Rails to 8.1.3 (Ruby unchanged at 3.2.11, new gemset rails8-upgrade)
- config.load_defaults 8.1; merge app:update diffs for all environment files
- Remove routing-filter 0.7.0; replace with native scope '(:locale)' in
routes.rb and default_url_options in ApplicationController
- Delete config/initializers/routing_filter_rails71_patch.rb
- Replace vendored TinyMCE 3.x (~200 files) with tinymce-rails ~> 8.3;
migrate admin_interface.js from jQuery .tinymce()/advanced theme to
tinymce.init(); add config/tinymce.yml; note: TinyMCE 7+ is GPL
- rails-i18n ~> 8.0 added explicitly (previously indirect dependency)
- awesome_nested_set, acts-as-taggable-on pinned to git main/master
(gemspec activerecord < 8.1 ceiling; no functional incompatibility;
repin to version once upstream releases updated gemspecs)
- globalize ~> 7.0, libxml-ruby ~> 5.0, nokogiri ~> 1.18, pg ~> 1.5
- sass-rails, coffee-rails, uglifier moved from :assets group to main
(Sprockets 4 convention; :assets group no longer meaningful)
- Node: head, draft, lock_owner marked belongs_to optional: true
- Page: node, user, editor marked belongs_to optional: true
- Static assets in public/images/ and public/javascripts/ referenced via
plain HTML tags; Rails 8 load_defaults raises on pipeline helpers for
undeclared assets
- sessions_controller_test.rb: remove stale require and dead rescue_action
- users_controller_test.rb: assert button[type=submit] not input[type=submit]
(Rails 8 button_to renders <button> not <input>)
- test_helper.rb: node.reload after children.create! (awesome_nested_set
3.9.0 does not refresh parent in memory after callback)
- 129 runs, 339 assertions, 3 failures, 0 errors — identical baseline to 7.2
Diffstat (limited to 'config/puma.rb')
| -rw-r--r-- | config/puma.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 0000000..38c4b86 --- /dev/null +++ b/config/puma.rb | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | # This configuration file will be evaluated by Puma. The top-level methods that | ||
| 2 | # are invoked here are part of Puma's configuration DSL. For more information | ||
| 3 | # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. | ||
| 4 | # | ||
| 5 | # Puma starts a configurable number of processes (workers) and each process | ||
| 6 | # serves each request in a thread from an internal thread pool. | ||
| 7 | # | ||
| 8 | # You can control the number of workers using ENV["WEB_CONCURRENCY"]. You | ||
| 9 | # should only set this value when you want to run 2 or more workers. The | ||
| 10 | # default is already 1. You can set it to `auto` to automatically start a worker | ||
| 11 | # for each available processor. | ||
| 12 | # | ||
| 13 | # The ideal number of threads per worker depends both on how much time the | ||
| 14 | # application spends waiting for IO operations and on how much you wish to | ||
| 15 | # prioritize throughput over latency. | ||
| 16 | # | ||
| 17 | # As a rule of thumb, increasing the number of threads will increase how much | ||
| 18 | # traffic a given process can handle (throughput), but due to CRuby's | ||
| 19 | # Global VM Lock (GVL) it has diminishing returns and will degrade the | ||
| 20 | # response time (latency) of the application. | ||
| 21 | # | ||
| 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 | # | ||
| 25 | # Any libraries that use a connection pool or another resource pool should | ||
| 26 | # be configured to provide at least as many connections as the number of | ||
| 27 | # threads. This includes Active Record's `pool` parameter in `database.yml`. | ||
| 28 | threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) | ||
| 29 | threads threads_count, threads_count | ||
| 30 | |||
| 31 | # Specifies the `port` that Puma will listen on to receive requests; default is 3000. | ||
| 32 | port ENV.fetch("PORT", 3000) | ||
| 33 | |||
| 34 | # Allow puma to be restarted by `bin/rails restart` command. | ||
| 35 | plugin :tmp_restart | ||
| 36 | |||
| 37 | # Run the Solid Queue supervisor inside of Puma for single-server deployments. | ||
| 38 | plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] | ||
| 39 | |||
| 40 | # Specify the PID file. Defaults to tmp/pids/server.pid in development. | ||
| 41 | # In other environments, only set the PID file if requested. | ||
| 42 | pidfile ENV["PIDFILE"] if ENV["PIDFILE"] | ||
