Warning about ruby version when moving to qpixel installation directory with RVM Question
After ruby (version 3.1.2) install with RVM, when I move to the qpixel install directory (with cd qpixel
command), the following warning is displayed in the terminal:
Unknown ruby interpreter version (do not know how to handle): >=2.7,<4.
But my local instance of QPixel seems to "work" without problem.
Questions
- Why I obtain this warning?
- What does it mean?
- Should I worry about for running my local instance of qpixel?
Setup
Ruby installed with: rvm install 3.1.2
.
Output of ruby -v
command on Debian 11 (on WSL2): ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
I obtain the above warning with several OS: Debian 11 (WSL2) and 12, Ubuntu 22.04.2 TLS , Fedora 38 and Arch Linux.
1 answer
I believe that rvm has a mechanism where it will automatically switch to the correct ruby version based on the lockfile. So if the lockfile of an application were to say:
ruby '3.1'
, rvm will detect that and automatically switch to using the correct Ruby version for the project out of the potentially many versions you have installed (or prompt you to install it, or maybe it even installs it for you).
Now the problem is that somewhat recently ruby 2.7 became End-Of-Life. Ruby 3.0 made some syntax/behavior changes which actually broke compatibility with older code (hence why it went from Ruby 2 to Ruby 3). We updated QPixel to support these new versions of Ruby 3 but for now we also maintain compatibility with Ruby 2.7 to give people more time to update.
In doing so, we had to switch from listing a specific ruby version to a range of versions, defined as >= 2.7, < 4
. That is, 2.7 is supported, and all Ruby 3 versions are supported (and should work), but Ruby 4 (when that is released) probably won't be. RVM does not support this statement in it's auto version switching, hence why you see the error.
So to answer your questions:
- Because we have a range version listed in our lockfile
- RVM is unable to determine the version of ruby to auto-switch to
- No, RVM's fallback behavior for if the auto-switching does not work, is to use the "currently set version of ruby", which in almost all cases is a supported version.
1 comment thread