-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rails 6 #3103
Comments
Just discovered today that Rails is no longer supporting the Webpacker gem. I learned this after running Rails 7 moves away from Webpacker and provides 3 new options for how to manage JS We should also consider upgrading:
|
I took some time and tried to upgrade the roadmap code to Rails 6.1. It went fairly well. I tested some of the feature and with some minor corrections I managed to get the roadmap code to run. |
Hi @benjaminfaure I think that's probably the best course of action. Just create a rails_6 branch off of the development branch and push it up to this repository. We can all then work from that branch as we move forward with any upgrade work. @raycarrick-ed and I will need to remember to keep that new branch up to date if we merge any PRs into dev/master. |
Tagging @gjacob24 here as she wanted to give this an initial look for the DMPonline team |
Thanks for getting this started @benjaminfaure and for creating the rails_6 branch. We can all begin to work from there (or branched that stem from rails_6). I was able to get the code up and running but had to add a minor change to the various I also ran rspec and am seeing lots of Deprecation warnings and failing tests (although those failures could be due to changes in the rspec framework and not the app itself). I don't think these are too bad though, probably only a few updates needed to fix most of the warnings/errors. For example:
We're going to need to go through the upgrade docs:
And then fix any failing tests and deprecation warnings. Once all of that is squared away we can look into upgrading Ruby and individual gems where applicable. |
Added a new wiki page to record upgrade notes: https://github.com/DMPRoadmap/roadmap/wiki/Rails-Upgrade-Notes The intended audience would be developers who manage their own instances and may need to upgrade their own cutomizations |
I was just doing some reading on Rails 7 and discovered that they're moving away from Webpacker and UJS (which they introduced in Rails 5/6). An apparent side effect is that there is no longer support for This is going to have a potentially significant impact on us: https://guides.rubyonrails.org/working_with_javascript_in_rails.html |
Yes, we also tried to remove webpacker in another project after the Rails upgrade. Just an FYI that the Rails conference is next week (June 15), they might introduce Rails 6/7 features and how to upgrade (mainly Rails 7 I think). I will update here if I find anything helpful for us. |
Thanks @pengyin-shan! I find it super frustrating that they would not make something like that backwards compatible since they introduced it and guided us all to adopt it :/ |
I personally feel that handling javascript is the 'special' (?) part of the Rails framework, compared to other frameworks because the MVC style is more strictly maintained in Rails. Now since other frameworks are becoming more flexible in interacting with js (like node, which is easy to add front-end framework like react or angular), Rails team is also trying to catch the trend. But this is a periodical pain because now the framework needs to balance between strict MVC rules and client-side interactions. |
As for |
Agreed, the boundaries between the two have always been a bit strange and hard to manage. There doesn't appear to any official guidance at this point. for example: https://stackoverflow.com/questions/71422105/rails-ajax-rails-is-not-defined-rails-7 This likely means that we cannot move to 7 this summer and will need to deal with it next year. I wonder if its a good opportunity to start moving towards a JS framework like React or Vue. Some of my colleagues have done this in their Rails projects and they've been able to manage it without having to rewrite the entire application (e.g. they have a single page that is managed with React). We moved to the js.erb model because most of our individual strengths have been with backend development and Rails. The JS skillset is something we would need training on. Do any of the @DMPRoadmap/devs have experience with React or another JS framework? @pengyin-shan if you could find out what their official recommendations are at the conference, that would be great! |
@briri for sure I will pay attention to this! For the adding front-end framework thing, I was recently trying to add react to node (I think a similar way could work for Angular or Vue, not sure about Rails side though). A possible pattern is that the server-side deals with API only. For example:
And the client side proxy to the server:
But I haven't tried rails yet...we need to change a lot using this way. So probably a simple re-write of |
I used React/Redux a few years ago on another project. I did some tests with React & Rails, if you use this gem https://github.com/reactjs/react-rails you can include React components into html.erb file and pass partial variables as components props. It's really convenient because it's possible to rewrite parts of the UI and not do a complete overall. |
Created a new issue #3187 to keep a track of all the tasks needed to be completed before the rails 6 release. Hope it's useful. I will add tasks to it as I do some user testing. Please edit as required. |
It's a mess here on Ubuntu 22.04 I could not install ruby 2.7 because of an SSL issue (openssl dropped support for an encryption scheme needed to compile ruby 2.7). It looks like I'm on a dead-end street; The only solution left for me seems to downgrade openssl on my server... bad 😞 |
Hello everyone,
According to Rails maintenance policy, Rails 5.2 we'll reach its end of life in June 2022
https://guides.rubyonrails.org/maintenance_policy.html
Seems like yet another Rails upgrade is on the horizon.
Rails 7 is already out, I guess they switched to yearly release for major versions of the framework. Hopefully upgrading won't be such a big step anymore
The text was updated successfully, but these errors were encountered: