0

I just upgraded my macOs to Sierra, and trying to set it up. On trying to use rvm to install ruby, I'm getting this very weird error:

__rvm_detect_max_threads:cd:21: string not in pwd: /Users/sunday/workspace/contributions

I have only one folder in the directory /workspace/contributions and not knowing what the error is, tried to remove /workspace/contributions, but the error still persists.

On using the --debug option, following is the trace I have:

~ rvm reinstall --debug 2.2.0 --disable-binary
2.2.0 - reinstall
ruby-2.2.0 - #already removed src/ruby-2.2.0
ruby-2.2.0 - #already removed rubies/ruby-2.2.0
ruby-2.2.0 - #already removed src/ruby-2.2.0
ruby-2.2.0 - #already removed rubies/ruby-2.2.0
Free disk space 73467MB, required 440MB.
__rvm_setup_compile_environment_setup ruby-2.2.0
rvm_autolibs_flag=enable
__rvm_setup_compile_environment_movable_early ruby-2.2.0
__rvm_setup_compile_environment_system_early ruby-2.2.0
__rvm_setup_compile_environment_requirements ruby-2.2.0
Checking requirements for osx.
requirements code for osx loaded
requirements lib type set to osx_brew
brew seems to be writable
Found required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl.
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sunday/.rvm/bin
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/libyaml )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/readline )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/libksba )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/openssl )
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
__rvm_setup_compile_environment_movable ruby-2.2.0
__rvm_setup_compile_environment_parse_name ruby-2.2.0
__rvm_setup_compile_environment_system ruby-2.2.0
__rvm_setup_compile_environment_architectures ruby-2.2.0
rvm_architectures(0):.
__rvm_setup_compile_environment_gcc47plus ruby-2.2.0
__rvm_setup_compile_environment_bison ruby-2.2.0
__rvm_setup_compile_environment_flags_docs ruby-2.2.0
__rvm_setup_compile_environment_flags_shared_static ruby-2.2.0
__rvm_setup_compile_environment_flags_threads ruby-2.2.0
__rvm_detect_max_threads:cd:21: string not in pwd: /Users/sunday/workspace/contributions
__rvm_rm_rf already gone: /Users/sunday/.rvm/tmp/6618*
➜  ~ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
➜  ~ 

This also happens when I try to use install instead of reinstall.

What can be happening here, and how can I get this resolved to install ruby on my machine?

x6iae
  • 4,074
  • 3
  • 29
  • 50

2 Answers2

0
 ➜  ~ ruby -v
 ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

Remove this darwin version of ruby which comes as default in osx.

Uninstall rvm

rvm implode

Install rvm as per documentation

\curl -sSL https://get.rvm.io | bash -s stable

Restart the terminal and confirm that rvm is installed properly.

rvm notes

Not install ruby versions as required using rvm.

rvm install 2.2.0
Bijendra
  • 9,467
  • 8
  • 39
  • 66
  • `➜ ~ ruby -v ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]` How to remove the darwin version? I've tried imploding and reinstalling, but nothing is changing yet, so, How can I remove the default darwin version? – x6iae Sep 29 '16 at 07:28
  • rm -rf ~/.rvm remove the rvm folder. it should remove the rubies – Bijendra Sep 30 '16 at 08:59
0

Following this thread https://github.com/rvm/rvm/issues/3686 on Github, I was able to get it installed by using the command:

rvm install ruby-2.3.1 --disable-binary -j 8

According to the comment:

So it seems like the "detect number of CPU threads" functionality is, for whatever reason, breaking it on my machine.

x6iae
  • 4,074
  • 3
  • 29
  • 50