Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ruby_on_rails/app_initialisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ Some other adjustments must be performed manually.

### Automatic adjustments

> ⭐️The `config/database.yml` is updated to have a `collation: C.UTF-8` setting.
> This ensures deterministic, locale-independent sorting and avoids inconsistencies between local and production
> environments.

> ⭐The Gemfile reads the required ruby version from the `.ruby-version` file.
> [This is used by Heroku to determine what version to use.](https://devcenter.heroku.com/articles/ruby-versions)
> Deploio reads the ruby version from the Gemfile, with the .ruby-version file inlined into it. https://paketo.io/docs/howto/ruby/#override-the-detected-ruby-version
Expand Down
6 changes: 5 additions & 1 deletion ruby_on_rails/template.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# replace rubocop-rails-omakase with renuocop
# configure the database collation
insert_into_file "config/database.yml", after: "adapter: postgresql\n" do
" template: template0\n collation: C.UTF-8\n"
Copy link
Copy Markdown
Member Author

@sislr sislr Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template0 is required as it fails otherwise with:

PG::InvalidParameterValue: ERROR:  new collation (C.UTF-8) is incompatible with the collation of the template database (C) (PG::InvalidParameterValue)
HINT:  Use the same collation as in the template database, or use template0 as template.

end

# replace rubocop-rails-omakase with renuocop
gsub_file "Gemfile", /gem "rubocop-rails-omakase"/, "gem \"renuocop\""

insert_into_file "Gemfile", after: /^group :development do\n/ do
Expand Down
20 changes: 0 additions & 20 deletions templates/config/database.mysql.example.yml
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were outdated anyways

This file was deleted.

16 changes: 0 additions & 16 deletions templates/config/database.sqlite.example.yml

This file was deleted.

21 changes: 0 additions & 21 deletions templates/config/database.yml

This file was deleted.

Loading