11

I was failing to install ruby-2.3.0 by rvm, while it worked with ruby-2.2.0.

The error message is as below

Error running '__rvm_make -j 1',
showing last 15 lines of /Users/Rookie/.rvm/log/1472865655_ruby-2.3.0/make.log
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling dmyenc.c
linking miniruby
config.status: creating ruby-runner.c
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
Referenced from: /Users/Rookie/.rvm/src/ruby-2.3.0/./miniruby (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
Referenced from: /Users/Rookie/.rvm/src/ruby-2.3.0/./miniruby (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib

make: *** [.rbconfig.time] Trace/BPT trap: 5
+__rvm_make:0> return 2
There has been an error while running make. Halting the installation.

/usr/lib/libSystem.B.dylib is where it is...

Is there any way to fix it?

Taie
  • 1,021
  • 16
  • 29
Rookie
  • 313
  • 2
  • 10
  • Is [`rbenv`](https://github.com/rbenv/rbenv) able to do it? – tadman Sep 03 '16 at 05:07
  • 1
    The output says `miniruby` was built for 10.12. If you're on 10.11 and trying to run executables built for 10.12 that's probably the problem. – nloveladyallen Sep 05 '16 at 18:18
  • FWIW, I had the same problem when attempting `rvm install ruby-2.2.4` and also starting the rails server. I switched from using Thin app server back to WEBrick and rails server starts just fine now. I'm also on 10.11.6 – Slenny Sep 21 '16 at 18:12

3 Answers3

16

I had the same problem with Ruby 2.3.1 (El Capitan). The good news I solved it. :-)

I followed the installation tutorial on this page: https://gorails.com/setup/osx/10.10-yosemite

After the first step:

brew install rbenv ruby-build

There is a message like: "Install the XCode Command Line Tools." Maybe they need to be reinstalled after updating XCode.

Like suggested, run:

sudo xcode-select --install

After that the Build and Install of Ruby worked for me.

teclis
  • 604
  • 1
  • 8
  • 19
3

** Mac OSX Sierra **

The answer above suggests to use brew install rbenv ruby-build. I did not have to. Since I do iOS development, I had Xcode installed. But apparently that does not install the xcode command line tools. So I just had to run the following first:

xcode-select --install
Daniel Viglione
  • 8,014
  • 9
  • 67
  • 101
0

I think the linked answer is relevant, my code worked after running the command:

pip install 'pillow!=5.1.0'

Which I found at: https://stackoverflow.com/a/49987984/9902361

Kristianmitk
  • 4,528
  • 5
  • 26
  • 46
rmd0001
  • 133
  • 1
  • 5