我正在尝试学习Ruby on Rails并想要关注Apple的例子: http://developer.apple.com/tools/developonrailsleopard.html
它需要Ruby 1.8.6和Rails 2.0.2
我的机器已经更新到1.9.1。我想使用rvm来安装1.8.6但是在使用以下日志的make期间失败了:
[2010-10-20 10:43:31] make
eval.c: In function ‘rb_eval_string_wrap’:
eval.c:1743: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_eval_cmd’:
eval.c:1884: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘call_trace_func’:
eval.c:2735: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_raise_jump’:
eval.c:4760: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘method_missing’:
eval.c:5684: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_call0’:
eval.c:5847: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_f_eval’:
eval.c:6634: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘exec_under’:
eval.c:6658: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_load’:
eval.c:6894: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘call_end_proc’:
eval.c:7924: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_f_END’:
eval.c:7937: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘mproc’:
eval.c:9557: warning: assignment discards qualifiers from pointer target type
file.c: In function ‘lchmod_internal’:
file.c:1787: warning: cast from pointer to integer of different size
gc.c: In function ‘obj_free’:
gc.c:1287: warning: initialization from incompatible pointer type
regex.c: In function ‘ruby_re_compile_pattern’:
regex.c:1362: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘long int’
regex.c:2026: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘long int’
ptr.c: In function ‘rb_dlptr_inspect’:
ptr.c:461: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 7 has type ‘struct ptr_data *’
ptr.c:461: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 8 has type ‘void *’
void
char
short
int
long
float
double
sym.c: In function ‘rb_dlsym_inspect’:
sym.c:270: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 6 has type ‘struct sym_data *’
sym.c:270: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 7 has type ‘void *’
ossl_asn1.c: In function ‘decode_bool’:
ossl_asn1.c:313: warning: passing argument 2 of ‘d2i_ASN1_BOOLEAN’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_int’:
ossl_asn1.c:328: warning: passing argument 2 of ‘d2i_ASN1_INTEGER’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_bstr’:
ossl_asn1.c:347: warning: passing argument 2 of ‘d2i_ASN1_BIT_STRING’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_enum’:
ossl_asn1.c:373: warning: passing argument 2 of ‘d2i_ASN1_ENUMERATED’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_null’:
ossl_asn1.c:390: warning: passing argument 2 of ‘d2i_ASN1_NULL’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_obj’:
ossl_asn1.c:407: warning: passing argument 2 of ‘d2i_ASN1_OBJECT’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_time’:
ossl_asn1.c:435: warning: passing argument 2 of ‘d2i_ASN1_TIME’ from incompatible pointer type
ossl_asn1.c: In function ‘ossl_asn1_get_asn1type’:
ossl_asn1.c:503: warning: cast to pointer from integer of different size
ossl_asn1.c: In function ‘ossl_asn1_decode0’:
ossl_asn1.c:727: warning: passing argument 1 of ‘ASN1_get_object’ from incompatible pointer type
ossl_ns_spki.c: In function ‘ossl_spki_initialize’:
ossl_ns_spki.c:67: warning: passing argument 2 of ‘d2i_NETSCAPE_SPKI’ from incompatible pointer type
ossl_ocsp.c: In function ‘ossl_ocspreq_initialize’:
ossl_ocsp.c:114: warning: passing argument 2 of ‘d2i_OCSP_REQUEST’ from incompatible pointer type
ossl_ocsp.c: In function ‘ossl_ocspres_initialize’:
ossl_ocsp.c:321: warning: passing argument 2 of ‘d2i_OCSP_RESPONSE’ from incompatible pointer type
ossl_pkcs7.c: In function ‘ossl_pkcs7si_new’:
ossl_pkcs7.c:90: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_pkcs7.c: In function ‘DupPKCS7SignerPtr’:
ossl_pkcs7.c:103: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_pkcs7.c: In function ‘ossl_pkcs7ri_new’:
ossl_pkcs7.c:116: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_pkcs7.c: In function ‘DupPKCS7RecipientPtr’:
ossl_pkcs7.c:129: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_pkey_dsa.c: In function ‘ossl_dsa_initialize’:
ossl_pkey_dsa.c:141: warning: passing argument 1 of ‘PEM_ASN1_read_bio’ from incompatible pointer type
ossl_pkey_dsa.c:141: warning: passing argument 4 of ‘PEM_ASN1_read_bio’ from incompatible pointer type
ossl_pkey_dsa.c: In function ‘ossl_dsa_to_public_key’:
ossl_pkey_dsa.c:313: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_x509attr.c: In function ‘ossl_x509attr_initialize’:
ossl_x509attr.c:100: warning: passing argument 2 of ‘d2i_X509_ATTRIBUTE’ from incompatible pointer type
ossl_x509ext.c: In function ‘ossl_x509ext_initialize’:
ossl_x509ext.c:285: warning: passing argument 2 of ‘d2i_X509_EXTENSION’ from incompatible pointer type
ossl_x509name.c: In function ‘ossl_x509name_initialize’:
ossl_x509name.c:135: warning: passing argument 2 of ‘d2i_X509_NAME’ from incompatible pointer type
ossl_x509revoked.c: In function ‘ossl_x509revoked_new’:
ossl_x509revoked.c:48: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_x509revoked.c: In function ‘DupX509RevokedPtr’:
ossl_x509revoked.c:64: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
[2010-10-20 10:50:17] make
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
[2010-10-20 11:48:12] make
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
[2010-10-20 15:30:53] make
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
[2010-10-20 17:19:27] make
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
有人可以帮忙吗?我完全迷失在这里......
答案 0 :(得分:2)
那篇文章我2.5岁。我不建议遵循它。如果你仍然想要那么你可以尝试rvm安装Ruby 1.8.7。我从未听说过1.8.6和1.8.7之间的任何兼容性问题。
我建议您按照设置Rails Development System on Mac OSX Snow Leopard并从那里开始定期Getting Started with Rails。