rbenv Ruby 3.0.6 "cannot load such file -- socket" #2625
Replies: 1 comment 2 replies
-
|
Hi, since this is not a bug with rbenv, but a build failure in Ruby's own build system, I've converted this to a Discussion in the ruby-build repository. First of all, I can reproduce this on macOS 26.2 when attempting to install both Ruby 3.0.6 and the latest 3.0.x version, Ruby 3.0.7: $ curl -fsSL https://github.com/ruby/ruby/commit/1dfe75b0beb7171b8154ff0856d5149be0207724.patch | \
rbenv install 3.0 --force --keep --patch -- --with-ext=socket,+Some notes:
I get this output: We can see that "socket" extension failed to compile, and now the build is properly aborted. The reason why the extension failed to compile might be in the extension's own log, which I'm uploading here: https://gist.github.com/mislav/46a5082b48f42938e41632f4f165b9c9 This log file is hard to read because it contains everything that Ruby attempted to test during "socket" extension compilation, and that may include warnings and errors that were non-fatal. In fact, by casually scanning this log file I can't detect what exactly is the cause of the error, but I know for a fact that Ruby 3.0 was able to compile using an older version of macOS. This might be an example of an issue that stems from newer macOS changing some of its libraries and APIs, and older Rubies become incompatible with the OS due to their EoL (End-of-Life) status. You may be able to find another patch to apply to this Ruby version, but instead I'd strongly advise you to upgrade your project to a Ruby version that compiles on your system. Finally, do NOT do |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm on a new Mac: M5 Pro, OS Tahoe 26.4. Installed rbenv fresh, and installed ruby 3.0.6 with it, using a patch as outlined in other threads. For the record, these are the commands I used:
Ruby 3.0.6 is installed successfully. However, when trying
gem install bundleror just try to do anything, I get the following error (including stack trace that comes up when I trybundle install):I tried installing and using 3.1.0 on a separate directory and installing bundler and I'm getting the same error. I also ran the
rbenv_doctorscript and it didn't diagnose any issues. I'd appreciate any help with this, as I've been at it by myself for a whole day. Thanks!Beta Was this translation helpful? Give feedback.
All reactions