Since Rails 8 will be released soon I decided to test my custom application layout and upgrade prototype I use for my pet projects from Rails 7 to Rai

[EN] How I upgraded my pet project from Rails 7 to Rails 8 in 30 minutes

submited by
Style Pass
2024-10-30 19:30:07

Since Rails 8 will be released soon I decided to test my custom application layout and upgrade prototype I use for my pet projects from Rails 7 to Rails 8. I will go over the whole process step by step and maybe customization that made it easy will become one you’d like to try yourself.

The only feature application has is an authentication with devise so I (almost) did not have any issues with app functionality or changes introduced in Rails 8.

At this point I couldn’t run the project because some files have been overwriten with default versions provided by the generator. So next I reviewed changes and put back customiztions. Fortunately my project has just a few files that have changes and changes are minimal.

One last part was to check if Rubocop checks and RSpec suite pass. I run bin/rubocop -A . to fix the first one and had to change the test I have to make it pass.

Whenever there is a need to change the generated file I introduce new file where I add the change and load a file with change from the original file. Naming convention I use - customization file has the same name as the generated with custom/ prefix. So custom configuration for .rubocop.yml is in custom/.rubocop.yml etc.

Leave a Comment