[英]rvm gets "undefined method 'empty?' for nil:NilClass" installing Ruby on macos
I'm trying to install Ruby 3.0.x using rvm on a 2018 Mac mini.我正在尝试在 2018 Mac mini 上使用 rvm 安装 Ruby 3.0.x。 I couldn't install 3.0.4, 3.0.2, 3.0.0 (then I tried 2.7.5, just to see if the issue was specific to 3.0.x).
我无法安装 3.0.4、3.0.2、3.0.0(然后我尝试了 2.7.5,只是想看看问题是否特定于 3.0.x)。 All 4 of these installs failed with exactly the same error:
所有 4 次安装都失败,并出现完全相同的错误:
ruby-3.0.4 - #post-configuration - please wait
ruby-3.0.4 - #compiling - please wait
Error running '__rvm_make -j6',
please read /Users/macmini/.rvm/log/1652638839_ruby-3.0.4/make.log
There has been an error while running make. Halting the installation.
make.log ends with the following lines make.log 以以下几行结尾
generating encdb.h
builtin_binary.inc updated
compiling builtin.c
encdb.h updated
x86_64-darwin21-fake.rb updated
NoMethodError: undefined method `empty?' for nil:NilClass
<main> at -e:2
make: *** [.rbconfig.time] Error 1
+__rvm_make:0> return 2
I get this same failure on Big Sur and on Monterey 12.3.1.我在 Big Sur 和 Monterey 12.3.1 上也遇到了同样的失败。
There is an issue on github that has 8 people reporting what sounds like the same error between 8/10/21 and 2/24/22, with no one reporting a solution (except a suggestion of switching to rbenv). github上有一个问题,有 8 个人报告了 21 年 8 月 10 日和 22 年 2 月 24 日之间听起来相同的错误,但没有人报告解决方案(除了切换到 rbenv 的建议)。 Two of these posts have lines at the end of make.log that are extremely similar to what I'm seeing:
其中两个帖子在 make.log 末尾的行与我所看到的非常相似:
encdb.h updated
NoMethodError: undefined method `empty?' for nil:NilClass
-e at -e:2
make: *** [.rbconfig.time] Error 1
+__rvm_make:0> return 2
Any assistance would be greatly appreciated!任何帮助将不胜感激! Thanks!!!
谢谢!!!
Wayne Vucenic韦恩·武切尼奇
Figured it out.弄清楚了。 My current & default ruby was set to jruby-9.2.9.0.
我当前和默认的 ruby 设置为 jruby-9.2.9.0。 I set it to ruby-2.7.6 and now 3.0.4 installs without any issues.
我将它设置为 ruby-2.7.6,现在安装 3.0.4 没有任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.