Conversation
|
Just a couple of questions and comments:
That's weird. Do you have a link/traceback or anything else to investigate it further? The development_app is working on my machine, I have Pop!_OS 22.04 LTS, that's based on Ubuntu 22.04 LTS. I can compile it well with asdf-vm. nightly.decidim.org is on v0.27.0.dev (with Ruby 3.0.2) on Ubuntu 20.04.4 LTS with rbenv. Which ruby version manager are you using? |
|
You are totally right about the Ruby version on Decidim
This is the bug: https://bugs.ruby-lang.org/issues/18658
No a Pop!OS user, maybe it uses a different openssl version?
Yes
I use I was exploring the difficulty to upgrade to Ruby 3.1.1 with this PR. I wont be as easy as it was when upgrading the Ruby 2.x series but I can take some time each week to work on it. |
Yes, it is: $ dpkg -l |grep libssl-dev
ii libssl-dev:amd64 3.0.2-0ubuntu1.2 amd64 Secure Sockets Layer toolkit - development filesAnd on Ubuntu 20.04, with an older libssl-dev but it seems like it's still working: $ dpkg -l |grep libssl-dev
ii libssl-dev:amd64 1.1.1f-1ubuntu2.13 amd64 Secure Sockets Layer toolkit - development files
$ rbenv install 3.0.1
Downloading ruby-3.0.1.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.1.tar.gz
Installing ruby-3.0.1...
Installed ruby-3.0.1 to /home/ruby-data/.rbenv/versions/3.0.1
$ rbenv install 3.0.2 # Just to be extra sure
rbenv: /home/ruby-data/.rbenv/versions/3.0.2 already exists
continue with installation? (y/N) y
Downloading ruby-3.0.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.gz
Installing ruby-3.0.2...
Installed ruby-3.0.2 to /home/ruby-data/.rbenv/versions/3.0.2
Yes, I agree.
Mind that there are some unrelated specs failing ( Also, thanks for taking care of this one! I agree that using the latest versions of Ruby/Rails is desirable |
Aliases are not suported by default on psych 4
6692f55 to
abe49ee
Compare
As v5.2.2 failed when executing with Ruby 3.1.1
f861855 to
38dc2d5
Compare
|
I was bitten by this one too 😅 I had a problem with bundler, tried to reinstall ruby 3 and couldn't because of this error. My theory is that I installed ruby 3.0.2 when I had Pop OS 21.10 (Ubuntu 21.10), and then updated my system. The workaround that I found is:
|
/opt/hostedtoolcache/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:27:in `require': cannot load such file -- net/pop (LoadError)
38dc2d5 to
c877f07
Compare
Ah @andreslucena that will explain why you got it under Ubuntu 22 I saw that workaround, anyway, thanks for the link to the guide, it may be useful in the meantime. |
|
@ahukkanen It raises an error from a line that does not exist in the file where Rubocop complains: there is no line with |
|
I've merged |
0eb8f3a to
92fb1ae
Compare
|
@ahukkanen the two failing tests are because of a temporal GitHub malfunction. I'll push -f again to see if they succeed. |
92fb1ae to
7afad99
Compare
ahukkanen
left a comment
There was a problem hiding this comment.
Great work @tramuntanal !
Few things before merging:
- Could you please merge with
developsince there are some merge conflicts - After the merge, could you fix the newly introduced rubocop linter issues from other PRs (I believe most of them should be resolved with the auto correct)
I've checked through the changes and have not noticed anything problematic. I've also tested locally and everything I tested worked fine after these changes.
Only thing I noticed was this issue with bundler but it's not related directly to these changes:
ruby/rubygems#5234
So the problem is every time running bundler, I get this deprecation warning:
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
But that can be quite easily fixed locally by running this within the instance (as suggested in the related issue):
$ bundle update --bundler|
@ahukkanen I've merged |
Thanks @tramuntanal! Don't worry about the test, it's a flaky one (or the comments functionality is a bit flaky with machine users). I'll just re-run it and merge once it passes. #9614 should fix that particular issue with the comments. |
* Upgrade Ruby to 3.1.1 * Fix LoadError when loading net/smtp * Downgrande psych to <4 until all libraries adapt to new defaults Aliases are not suported by default on psych 4 * Apply Rubocop cops for Ruby 3.1 * Upgade Brakeman to v5.2.3 As v5.2.2 failed when executing with Ruby 3.1.1 * Add net-smtp as a direct decidim-generators dependecy * Add dependency to net-* gems to avoid crash during tests /opt/hostedtoolcache/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:27:in `require': cannot load such file -- net/pop (LoadError) * Rubocopify * Rubocopify
🎩 What? Why?
The
developversion of Decidim runs on Ruby 3.0.2, but that Ruby version does not compile on Ubuntu 22.04 LTS (see https://bugs.ruby-lang.org/issues/18658). Ruby 3.1.1 instead compiles on Ubuntu 22.As Ubuntu is one, as far as I know, of the popular choices to install Decidim, and version 22 is starting to be the default in many datacenters this PR tries to address the mentioned problem.
Anyway, using the latest Ruby version is always desirable.
This is the stacktrace:
📌 Related Issues
Link your PR to an issue
Testing
development_appdevelopment_appapplication📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
No screenshots