5

I'm trying to install Ruby 2.5.1 by running rbenv install 2.5.1 and keep getting the below failure:

BUILD FAILED (macOS 12.0.1 using ruby-build 20211203)

Inspect or clean up the working tree at /var/folders/_n/7rd4p8r578db_ct2rrwhvwv80000gn/T/ruby-build.20211204124341.35704.JFosKp
Results logged to /var/folders/_n/7rd4p8r578db_ct2rrwhvwv80000gn/T/ruby-build.20211204124341.35704.log

Last 10 log lines:
    rb_mObjSpace = rb_const_get(rb_cObject, rb_intern("ObjectSpace"));
                                            ^~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1755:56: note: expanded from macro 'rb_intern'
        __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \

Tried everything here and here.

Any ideas what could be causing this?

Cole S
  • 408
  • 1
  • 3
  • 13

3 Answers3

2

Solved it by running $ RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.5.1

Cole S
  • 408
  • 1
  • 3
  • 13
  • I ran that command, and it says... `No versions specified for 2.5.1 in config files or environment` — any ideas what I am missing? – Zernach Mar 07 '23 at 19:48
  • As of today: `RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.8` still fails. crap – Mike S. Jul 12 '23 at 16:05
0

RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.5.9 its working fine

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 21 '23 at 05:46
0

i wanted to install ruby 2.6.5 , this below command worked for me RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.5