-
Notifications
You must be signed in to change notification settings - Fork 46
Upgrade Rails to LATEST - Also applies to CW #197
Description
Email from Dr. Shaffer to Nolan Platt (nolanplatt), 8 April 2025
Nolan -- Thank you for contemplating attempting the Rails server upgrade project! This looks to be more ambitious than the Sphinx upgrade, but hopefully we can get it broken down into some pieces. Alex, Dr. Edwards, and I were discussing this on Monday and came up with a few ideas and issues to share. I am hoping that we can continue this discussion with you on Friday at noon.
First, a bit of background and scope. In an ideal world, we want to upgrade both the OpenDSA and Code Workout servers to the latest version of Rails (8.0.2 was released in March). Code Workout's rails server was written first, and OpenDSA was essentially cloned from that, I think in 2015. Since then OpenDSA was updated a few years ago to Version 6, done by a TLOS programmer who was assigned to work on this part time one summer. I think this was either the summer of 2020 or 2021, Bob might remember better than I do. Code Workout was never significantly updated, and remains stuck somewhere between Versions 4 and 5, if I understand correctly.
Given how far out of date things are, we think that it is an open question regarding which strategy to use:
Do what you did with Sphinx, and advance it forward in steps from the current version up to Version 8.
Start with a Version 8 demonstration site, and bring in functionality from the existing server as possible until all functionality has been added or replaced.
We can talk about this, but our current thinking is that the second approach is more likely to be viable.
The big issue might not really be Rails, per se. Instead, we think the problem is that the systems are built using a lot of Ruby Gems from third parties. And that some critical gems are no longer maintained. In extreme cases, they are not just old, they are outright incompatible with later versions of Rails, and so are completely unusable. One critical offender appears to be the Formstastic forms system for building views. This is critical to both systems, and probably cannot be used at all in Rails 8. So we might need to replace this with a completely new system, and essentially reproduce the functionality.
We think that the first step in the process should be to take the Gems manifest from the existing systems (hopefully there is not a huge difference between OpenDSA and Code Workout, but this should get checked at the beginning), and see what their status is with respect to Rails Version 8. Then we can decide which of these need complete replacement, etc.