我提到了在 Rails 上安装 Ruby - Mac OS Lion并遵循Alain Beauvois 的回复,几乎所有事情都搞定了。唯一的区别是我使用的是 1.9.3 而不是 1.9.2。
我已经创建了.bash_profile
,甚至确保了它的存在open -e .bash_profile
,甚至添加了 Alain Beauvois 所说的这条线。
但现在似乎问题是我收到了这个错误:
Error running 'make', please read /usr/local/rvm/log/ruby-1.9.3-p374/make.log
There has been an error while running make. Halting the installation.
引用的日志包含以下内容:
[2013-02-02 21:41:52] make
CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.1 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace
SOLIBS =
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
我什至试过
rvm -install ruby-1.9.3-p374
但仍然得到同样的错误。在我进入这部分之前,我确实遇到了一些奇怪的错误,但是在我重新运行它并sudo
在它前面添加之后,它起作用了。AFAIK, =用权限/特权sudo
做某事,对吧?su