1

I am trying to install ruby-2.3.4 in my mac but without luck. Below is system's spec:

macOS Sierra Version 10.12.6

I have ruby 2.0 by default and I managed to install ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin16]

Below is the error thrown when I do rvm install ruby-2.3.4

ruby-2.3.4 - #removing src/ruby-2.3.4..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.3.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/someuser/.rvm/rubies/ruby-2.3.4, this may take a while depending on your cpu(s)...
ruby-2.3.4 - #downloading ruby-2.3.4, this may take a while depending on your connection...
ruby-2.3.4 - #extracting ruby-2.3.4 to /Users/someuser/.rvm/src/ruby-2.3.4.....
ruby-2.3.4 - #applying patch /Users/someuser/.rvm/patches/ruby/ruby_2_3_gcc7.patch.
ruby-2.3.4 - #applying patch /Users/someuser/.rvm/patches/ruby/2.3.4/fix_rb_thread_fd_close.patch.
ruby-2.3.4 - #applying patch /Users/someuser/.rvm/patches/ruby/2.3.4/random_c_using_NR_prefix.patch.
ruby-2.3.4 - #configuring...........................................................
ruby-2.3.4 - #post-configuration.
ruby-2.3.4 - #compiling...........
Error running '__rvm_make -j8',
please read /Users/someuser/.rvm/log/1528143943_ruby-2.3.4/make.log
There has been an error while running make. Halting the installation.

Any insight/idea what might be going on ?

Below are the bottom lines of the make.log file.

compiling enc/unicode.c
compiling enc/utf_8.c
compiling enc/trans/newline.c
1 warning generated.
linking miniruby
generating encdb.h
make: ./miniruby: Permission denied
make: ./miniruby: Permission denied
make: *** [.rbconfig.time] Error 1
make: *** Waiting for unfinished jobs....
make: *** [encdb.h] Error 1
++ return 2

Clearly, it's saying Permission denied. But I am not sure what kind of permission is it talking about ? I am able to install ruby 2.5.1p57 without any problem.

Chuchoo
  • 823
  • 2
  • 17
  • 36
  • 1
    `please read /Users/someuser/.rvm/log/1528143943_ruby-2.3.4/make.log` Do you have Xcode Command Line Tools installed? – tadman Jun 04 '18 at 21:13
  • Hey @tadman, I have pasted bottom few lines of make.log file above. Yes, I do have Xcode installed in my system. How does it help? – Chuchoo Jun 04 '18 at 21:25
  • Xcode and Xcode Command-Line Tools are different. What does the output of `clang -v` say? If that doesn't exist: `xcode-select --install`. – tadman Jun 04 '18 at 21:49
  • @tadman, Below is the output : Apple LLVM version 8.0.0 (clang-800.0.38) Target: x86_64-apple-darwin16.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin – Chuchoo Jun 05 '18 at 00:57
  • Looks like that part is installed correctly, which is good, but this permission denied thing looks like a permission error when installing with `rvm` which means you may need to `sudo` it or fix your permissions. – tadman Jun 05 '18 at 01:10
  • @tadman, running `rvm` with `sudo` gives me following error: `Checking requirements for osx_brew. Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all . build scripts full access to your system`. – Chuchoo Jun 05 '18 at 02:04
  • The best option is to fix the permissions on your `~/.rvm` directory to ensure you can write to everything in there. I'm not sure how `brew` factors in here since you're asking about RVM. – tadman Jun 05 '18 at 03:15
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/172546/discussion-between-chuchoo-and-tadman). – Chuchoo Jun 06 '18 at 01:04

1 Answers1

0

rvm reload did the magic. Running rvm install ruby-2.3.4 after running rvm reload worked like a charm.

Chuchoo
  • 823
  • 2
  • 17
  • 36