Since it's literally been months now I figured I'd finally just get on here and ask. I can't install any version of Ruby at all using RVM on MacOS Ventura. It doesn't seem to be related to problems that other people have had with this. I've tried all the other solutions. But this doesn't seem to be related to OpenSSL or anything like that.
The error I receive is also a bit different than those cases:
Error running '__rvm_make -j8'
For starters... here's the last few lines of the log I get when I run: rvm install 2.6.10
objspace.c:630:23: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:23: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
objspace.c:630:23: note: '{' token is here
imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1811:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
{ \
^
objspace.c:630:23: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1816:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
}
^
objspace.c:630:23: note: ')' token is here
imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:56: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
1342 warnings generated.
linking shared-object objspace.bundle
make: *** [build-ext] Error 2
+__rvm_make:0> return 2
I've also installed the latest version of macports (and got its path working correctly) uninstalled and reinstalled OpenSSL. Uninstalled and Reinstalled HomeBrew multiple times... Nothing seems to help.
UPDATE: This is the one error I could find.
error: use of undeclared identifier 'username_completion_function'; did you mean 'rl_username_completion_function'?
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
I searched the logs high and low but couldn't find the second error.
It's going to be difficult discerning exactly what I did to solve this problem. But I'll do my best to backtrace.
UPDATE 2024 If you recently installed MacOs Sonoma 14.5 or later... then you can just install the normal x86_64 version of homebrew. If you're using an OS older than Ventura... then go for the solution marked 2023 with arm64.
1. Uninstalled Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
If you're using an M1 chip on Sonoma or later then you MUST NOT use the arch -arm64 prefix otherwise it WILL fail.
2. Deleted ALL Remaining Homebrew Directories
sudo rm -rf /opt/homebrew
3. Reinstalled Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
4. Use rvm To Install Ruby
rvm install 3.2.4
You may or may not have to reinstall RVM at this point if you're using some older arm64 version. But I'd definitely just try to install ruby once you've gotten rid of the old arm64 homebrew. It's nice now to not have to think about prefixing things anymore. Remember to make sure that all your gems are the x86_64 versions instead of the arm64 versions otherwise you'll run into trouble.
That's it!
Solution 2023:
1. Uninstalled Homebrew
arch -arm64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
If you're using an M1 chip then you MUST use the arch -arm64 ahead of every command otherwise it WILL fail.
2. Deleted ALL Remaining Homebrew Directories
sudo rm -rf /opt/homebrew
3. Reinstalled Homebrew
arch -arm64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The reason for uninstalling Homebrew and getting rid of all its directories is that, if you're like me, you probably tried a MILLION things on your path to getting this to work. Removing Homebrew and its associated directories should wipe out any mistakes you may have made or desperate configuration gambles. To be sure though... you should look for hidden configuration files to make sure none of them reference Ruby.
4. Use rvm To Install Ruby
arch -arm64 rvm install 3.2.2
Again you MUST use "arch -arm64" or your install will absolutely fail. Only this time with an Error Code of "1" instead of "2".
That was it! Install completed. Hope this helps someone.