I'm trying to install Ruby 1.9.3 using rvm. However, when I type:
rvm install 1.9.3
I get the following error:
ERROR: Error running 'make ', please read /Users/nick/.rvm/log/ruby-1.9.3-rc1/make.log
ERROR: There has been an error while running make. Halting the installation.
I'm running Mac OS X Lion and my current version of Ruby is 1.9.2.
Edit: make.log:
make[1]: Entering directory `/Users/nick/.rvm/src/ruby-1.9.3/ext/readline'
/usr/bin/gcc-4.2 -I. -I../../.ext/include/x86_64-darwin11.0.0 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/nick/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o readline.o -c readline.c
readline.c: In function ‘username_completion_proc_call’:
readline.c:1386: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:1386: error: (Each undeclared identifier is reported only once
readline.c:1386: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make[1]: Leaving directory `/Users/nick/.rvm/src/ruby-1.9.3/ext/readline'
make: *** [mkmain.sh] Error 1
This is an issue with
readline
. Try compilingreadline
yourself from source:Source
The simpler, more general solution is to explicitly install the offending package and then reinstall with that package. In my case, it was aborting on openssl_missing, so:
For your case, it's probably:
This of course assumes that you installed rvm as yourself. Change accordingly...
Which version of Xcode are you using - 4.1 or 4.2? There are some issues with 4.2 and Ruby because 4.2 uses LLVM instead of GCC as the main compiler. Some of the information here may help you if you have 4.2. If you have 4.2 but don't mind going back to 4.1 it's possible to download 4.1 from Apple still on their developer's page but it's rather buried.
I have been running into issues on 1.9.3 on Snow Leopard, too. My make.log looks like this: