Closed sdubinsky closed 6 days ago
Other versions of ruby (3.1.2) install correctly. Is it possible the wrong version was uploaded?
ruby -v
should show 3.3.3, but it shows 3.3.5. I have confirmed that the actual ruby installed in .asdf/installs/ruby/3.3.3 says it's 3.3.5
That's so weird! From the install output that you've shared, it looks like 3.3.3 was downloaded and compiled and placed in that directory. But what you're saying is even if you run the binary directly, it prints the wrong version? E.g. ~/.asdf/installs/ruby/3.3.3/bin/ruby -v
I really doubt that a wrong Ruby version was uploaded as "3.3.3", since the community would have caught that within minutes. I also wasn't able to replicate this problem locally (by using ruby-build directly, which asdf install invokes under the hood).
Does the problem persist if you try to nuke your existing 3.3.3 version and install it again?
It's extremely weird! Yes, even running the binary directly says it's 3.3.5.
I nuked it two or three time at least trying to figure it out, including reinstalling asdf completely.
I'm not familiar with asdf, but you could try running ruby-build directly to try rule out that the problem comes from this project. Just download ruby-build anywhere, even to a temporary location, and try this:
rm -rf ~/.asdf/installs/ruby/3.3.3
/path/to/ruby-build/bin/ruby-build 3.3.3 ~/.asdf/installs/ruby/3.3.3
If that reproduces the same problem, then we can continue exploring. If the problem is gone, then I'm afraid that asdf or one of its plugins might have contributed to the problem. Sorry that I don't have better leads than that.
It's still happening.
I tried on git master
Bizarre. What do you get if you scan the download tarball directly?
$ curl -fsSL https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.3.tar.gz | tar xOz -- ruby-3.3.3/version.h | grep RUBY_VERSION_TEENY
#define RUBY_VERSION_TEENY 3
It should print "3" for TEENY version of Ruby, instead of 5 like you're getting.
You could inspect the Ruby source mid-compilation to see if anything is odd. First, use ruby-build to install an isolated version of 3.3.3:
ruby-build --keep 3.3.3 /tmp/ruby-3.3.3 -- --disable-install-doc
Then, verify that /tmp/ruby-3.3.3/bin/ruby -e "puts RUBY_VERSION"
prints 3.3.5 and exhibits the bug.
Now you can check what happened to its makefile. You can find Ruby's intermediate install location under a directory at ls -td $TMPDIR/ruby-build.*
. This is where Ruby source files were compiled. You can try viewing the generated $TMPDIR/ruby-build.*/ruby-3.3.3/Makefile
and see if MAJOR, MINOR, and TEENY values match.
If everything is consistently at "3.3.3" then I have no idea how the final binary prints "3.3.5". 😕
Indeed the bug still exists and MAJOR, MINOR, and TEENY are all 3. If you have no other ideas I'll just assume it will go away eventually. Thanks!
Well, I'm out of ideas and I will close this because it really sounds like something specific to your system somehow. I don't think it's a huge problem; even if your app needs 3.3.3, running it on 3.3.5 should not result in any tangible differences. Also, you mentioned that compiling other Ruby versions doesn't exhibit the same problem.
Maybe as a last attempt in debugging you can print all your environment variables (with env
), study the output and see if anything is in there that could affect Ruby runtime. Sorry I couldn't be of more help!
On Fedora 42, I installed ruby 3.3.3 and got ruby 3.3.5. Prior to this, post-upgrade to fedora 42, I tried and failed to run bundle update. It failed because it couldn't find the ruby headers.
Steps to reproduce the behavior
asdf update
asdf install ruby 3.3.3
asdf reshim
Expected vs. actual behavior
ruby -v
should show 3.3.3, but it shows 3.3.5. I have confirmed that the actual ruby installed in .asdf/installs/ruby/3.3.3 says it's 3.3.5, specifically:ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux]
Logs
install logs: