rvm获取“未定义的方法” nil:nilclass&quot&quot在MacOS上安装Ruby

发布于 2025-01-29 01:36:49 字数 1076 浏览 3 评论 0原文

我正在尝试使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

满地尘埃落定 2025-02-05 01:36:49

弄清楚了。我目前的&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.

虚拟世界 2025-02-05 01:36:49

仅安装了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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文