rvm获取“未定义的方法” nil:nilclass&quot&quot在MacOS上安装Ruby
我正在尝试使用RVM在2018 Mac Mini中安装Ruby 3.0.x。我无法安装3.0.4、3.0.2、3.0.0(然后我尝试了2.7.5,只是为了查看该问题是否特定于3.0.x)。所有这些安装中的所有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以以下几行结束,
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
我在Big Sur和Monterey 12.3.1上获得了相同的故障。
encdb.h updated
NoMethodError: undefined method `empty?' for nil:NilClass
-e at -e:2
make: *** [.rbconfig.time] Error 1
+__rvm_make:0> return 2
任何帮助将不胜感激!&nbsp; &nbsp;谢谢!!!
韦恩·韦奇尼克
I'm trying to install Ruby 3.0.x using rvm on a 2018 Mac mini. 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). All 4 of these installs failed with exactly the same error:
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
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.
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). Two of these posts have lines at the end of make.log that are extremely similar to what I'm seeing:
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
弄清楚了。我目前的&amp;默认Ruby设置为Jruby-9.2.9.0。我将其设置为Ruby-2.7.6,现在3.0.4安装没有任何问题。
Figured it out. My current & default ruby was set to jruby-9.2.9.0. I set it to ruby-2.7.6 and now 3.0.4 installs without any issues.
仅安装了Jruby,必须在安装新的Crouby版本之前使用
RVM使用System
。这是在Centos上。Only had JRuby installed, had to go with
rvm use system
before installing new CRuby version. And this was on Centos.