-
-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade the Ruby version and Ruby gems #2891
Comments
Hey there @jhsu802701, welcome to the Open Food Network! We're very much aware that our ruby/rails versions are not current...however we aren't able to upgrade until we finish the project of upgrading Spree to version 2. Doing this will then clear the way to us being able to upgrade ruby/rails. |
So for now I suggest closing this issue and perhaps having a look at what @dependabot-bot is listing out as dependencies if that's the kind of contribution you'd like to make to the repo. Or perhaps even better would be to join our slack channel and keep up to date on the spree upgrade (currently in progress with @luisramos0 and @sauloperez and @mkllnk and @HugsDaniel) process, so you can then take part in the subsequent updating of rails/ruby 😃 |
There are things that could be already adapted in our current versions that will work with future versions. Is this not correct? |
I like @luisramos0`s approach. We can't upgrade yet, but we can prepare ourselves for the upgrade. It would be good to know what we need to change for upgrading. |
That's an interesting idea. Theoretically, this would remove a great barrier of entry to new Ruby contributors. There's no need to be fully aware of OFN's and Spree's data model but of Rails/Ruby changes and I assume that's a potentially bigger set of devs. To my understadning
It shouldn't require any action as Ruby upgrades are backward compatible although I don't know off the top of my head what 2.3 brings in. AFAIK Spree does not force a particular version (or maybe we remove that restriction), so we could consider upgrading it before we finish with Spree.
I've been here already 🙈 . This will indeed require refactoring some calls to ActiveRecord methods and possibly other changes to the Gemfile. Someone can start with the former if we prepare detailed and scoped issues. Upgrade guide: https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-3-2-to-rails-4-0 @jhsu802701 it might be interesting to take a quick look at upgrading |
Quick scan into the guide.
A lot of things can't be done in Rails 3.2, but as @sauloperez mentioned, some of the ActiveRecord stuff can already be done. |
The spree upgrade to rails 4 is only in spree 2.1 here |
I created #3708 now to represent the upgrade to spree 2-1-0 together with the upgrade to rails 4. I read a little about the ruby versions after 2.1.5, the only thing that clearly stands out from all the release notes from 2.1 (end of 2014) to 2.6 (end of 2018) is that every single version makes significant performance improvements. So, upgrading ruby version is not only moving to supported versions of ruby is also making OFN run faster, which means happier users or less money on servers for the same capacity. This can be done at any time now: both rails 3.2 and rails 4.0 support ruby 2.2. In terms of priority, I believe this can either be picked up by the community (anyone can try to move ofn to ruby 2.2) or we can put it in our tech debt backlog after the upgrade to spree 2-1-0 #3708. |
In theory we can upgrade Ruby from I had a quick try at upgrading to |
could you list which ones @Matt-Yorkley I'd like to understand how hard it would be to upgrade. It's blocking few things and that will only exacerbate over time. |
I looked that up recently as well. A Ruby 2.1 upgrade should be no problem as you said. I upgraded Fair Food to 2.2 and needed to add one Rails gem dependency (bug in our Rails). I also had to patch one spec because an array was returned in a different order. It was very easy. |
was it the test gem or rake? Let's push it then 💪 ! |
We're currently upgrading from We should try upgrading to |
We need to learn from this upgrade and put the necessary automation/processes in place so upgrading becomes as easy as cake and get up to date soon both reliably and efficiently. |
Shall we close this? I guess we're not upgrading Ruby further until Rails is upgraded? |
We can probably close this now, but I might try bumping to |
Okay let's keep it open then. No prob |
#4518 is merged 🎉 |
As of 2018-10-18, this app has Ruby 2.1.5 (released 2014-11-13), Rails 3.2.22 (released June 16, 2015), nokogiri 1.6.8.1 (released October 03, 2016), and pg 0.21.0 (released June 12, 2017).
I will work on updating this app. I have experience upgrading the Adopt-A-Tree app (https://github.com/OpenTwinCities/adopt-a-tree).
The text was updated successfully, but these errors were encountered: