The error appears on the console whenever you navigate to the root of a Rails application and you’ve specified the Ruby version in the Gemfile.
You’re also using rvm.
The error happens when rvm has problems loading the ruby version you had specified in the Gemfile.
Try to run
rvm all do gem list error to see if the ruby installation is missing something.
If that doesn’t bring up anything obvious, try to reinstall the ruby version you had specified, e.g.
rvm reinstall ruby-2.3.0
During the reinstallation attempt, it may say in red text:
There is no checksum for '/ruby-2.3.0.tar.bz2' or 'ruby-2.3.0.tar.bz2', it's not possible to validate it. This could be because your RVM install's list of versions is out of date. You may want to update your list of rubies by running 'rvm get stable' and try again. If that does not resolve the issue and you wish to continue with unverified download add '--verify-downloads 1' after the command. There has been an error fetching the ruby interpreter. Halting the installation.
Try to update the list of rubies by running
rvm get stable.
There may be more red text, advising you to do stuff such as the following:
WARNING: you have 'rvm_configure_env' in /etc/rvmrc, run the following to fix: sudo sed -i'' -e "/rvm_configure_env=.*\/opt\/sm/d" /etc/rvmrc rvm autolibs smf It looks like some old stuff is laying around RVM, you can cleanup with: `rvm cleanup all`
Do them. It would reload rvm.
If rvm tells you that the ruby version, which you tried to reinstall, is not installed and advises you to do the install with a command (e.g.
rvm install ruby-2.3.0) do it.
If that installation attempt fails, rvm will spit out the last 15 lines. Google the output for a solution.
For my 10.11.6 OS X El Capitan machine, I tried to install ruby-2.3.0.
Error running '__rvm_make -j 1', showing last 15 lines of /usr/local/rvm/log/1497431672_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: /usr/local/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: /usr/local/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 ++ return 2 There has been an error while running make. Halting the installation.
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime and found a issue on ther rvm github that advises it’s due to updating xcode 8 beta on OSX 10.11. Running
xcode-select --install solves my issue, and I could proceed to install ruby-2.3.0.