Trying to install 1.9.3 using RVM.
Getting these errors in my make.log
compiling readline.c
readline.c:1499:9: error: use of undeclared identifier 'username_completion_function'; did you mean 'rl_username_completion_function'?
rl_username_completion_function);
^
readline.c:69:42: note: expanded from macro 'rl_username_completion_function'
# define rl_username_completion_function username_completion_function
^
/usr/local/include/readline/readline.h:443:14: note: 'rl_username_completion_function' declared here
extern char *rl_username_completion_function PARAMS((const char *, int));
^
1 error generated.
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2
make: *** [build-ext] Error 2
I faced this issue before in SL. I have Xcode 4.3.2 installed (also installed the command line tools) I have readline 6.2.2 installed.
Added export ARCHFLAGS="-arch x86_64"
to my .bash_login
file.
I also tried rvm install 1.9.3 --with-gcc=clang
but I am getting the same error and I would prefer to avoid doing it due to limited support.
Anyone have a workable procedure?
Edit:
I solved the problem. RVM wasn't recognizing the readline installed. Funny how readline manages to screw up so many people's installs.
This command points rvm toward the right readline location
rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr
来源:https://stackoverflow.com/questions/10343486/cannot-install-ruby-1-9-3-on-a-clean-lion-install