How do you install (build) Ruby 1.9.3 on OSX Lion? -
i've been working on installing ruby on mac, osx lion. i've installed xcode, gcc, readline, homebrew, , jewlerybox, have no idea what's going on. pointers?
here's terminal says?
hugo-pc:ruby-1.9.3-p125 squantowalks$ rvm install 1.9.3 fetching yaml-0.1.4.tar.gz /users/squantowalks/.rvm/archives extracting yaml-0.1.4.tar.gz /users/squantowalks/.rvm/src error running 'tar xmzf /users/squantowalks/.rvm/archives/yaml-0.1.4.tar.gz -c /users/squantowalks/.rvm/src ', please read /users/squantowalks/.rvm/log/ruby-1.9.3-p125/yaml/extract.log configuring yaml in /users/squantowalks/.rvm/src/yaml-0.1.4. error running ' ./configure --prefix="/users/squantowalks/.rvm/usr" ', please read /users/squantowalks/.rvm/log/ruby-1.9.3-p125/yaml/configure.log compiling yaml in /users/squantowalks/.rvm/src/yaml-0.1.4. error running 'make ', please read /users/squantowalks/.rvm/log/ruby-1.9.3-p125/yaml/make.log installing ruby source to: /users/squantowalks/.rvm/rubies/ruby-1.9.3-p125, may take while depending on cpu(s)... ruby-1.9.3-p125 - #fetching ruby-1.9.3-p125 - #extracted /users/squantowalks/.rvm/src/ruby-1.9.3-p125 (already extracted) ruby-1.9.3-p125 - #configuring ruby-1.9.3-p125 - #compiling error running 'make ', please read /users/squantowalks/.rvm/log/ruby-1.9.3-p125/make.log there has been error while running make. halting installation.
here's console log:
[2012-03-08 18:20:17] make cc = clang ld = ld ldshared = clang -dynamiclib -o3 -ggdb -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 -fno-common -pipe -l. -l/usr/local/lib cflags = -o3 -ggdb -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 -fno-common -pipe xcflags = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -druby_export cppflags = -d_xopen_source -d_darwin_c_source -i. -i.ext/include/x86_64-darwin11.3.0 -i./include -i. dldflags = -wl,-undefined,dynamic_lookup -wl,-multiply_defined,suppress -wl,-flat_namespace -install_name /users/squantowalks/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -wl,-unexported_symbol,_init_* -wl,-unexported_symbol,*_threadptr_* -wl,-u,_objc_msgsend solibs = linking miniruby <internal:prelude>:1: [bug] bus error ruby 1.9.3p125 (2012-02-16 revision 34643) [universal.x86_64-darwin11.3.0] -- control frame information ----------------------------------------------- c:0003 p:0002 s:0006 b:0006 l:000005 d:000005 top <internal:prelude>:1 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 finish c:0001 p:0000 s:0002 b:0002 l:0025e8 d:0025e8 top -- ruby level backtrace information ---------------------------------------- <internal:prelude>:1:in `<compiled>' -- c level backtrace information ------------------------------------------- see crash report log file under ~/library/logs/crashreporter or /library/logs/crashreporter, more detail of. -- other runtime information ----------------------------------------------- * loaded script: ./miniruby * loaded features: 0 enumerator.so [note] may have encountered bug in ruby interpreter or extension libraries. bug reports welcome. details: http://www.ruby-lang.org/bugreport.html make: *** [.rbconfig.time] abort trap: 6
thanks :)
edit: after installing macports , apple's 4.2 gcc (thanks guys), i'm getting this:
hugo-pc:bin squantowalks$ cc=/opt/local/bin/gcc-apple-4.2 rvm install 1.9.3fetching yaml-0.1.4.tar.gz /users/squantowalks/.rvm/archives extracting yaml-0.1.4.tar.gz /users/squantowalks/.rvm/src error running 'tar xmzf /users/squantowalks/.rvm/archives/yaml-0.1.4.tar.gz -c /users/squantowalks/.rvm/src ', please read /users/squantowalks/.rvm/log/ruby-1.9.3-p125/yaml/extract.log configuring yaml in /users/squantowalks/.rvm/src/yaml-0.1.4. error running ' ./configure --prefix="/users/squantowalks/.rvm/usr" ', please read /users/squantowalks/.rvm/log/ruby-1.9.3-p125/yaml/configure.log compiling yaml in /users/squantowalks/.rvm/src/yaml-0.1.4. error running 'make ', please read /users/squantowalks/.rvm/log/ruby-1.9.3-p125/yaml/make.log installing ruby source to: /users/squantowalks/.rvm/rubies/ruby-1.9.3-p125, may take while depending on cpu(s)... ruby-1.9.3-p125 - #fetching ruby-1.9.3-p125 - #extracted /users/squantowalks/.rvm/src/ruby-1.9.3-p125 (already extracted) ruby-1.9.3-p125 - #configuring ruby-1.9.3-p125 - #compiling error running 'make ', please read /users/squantowalks/.rvm/log/ruby-1.9.3-p125/make.log there has been error while running make. halting installation.
here's console log:
[2012-03-08 20:05:01] make cc = /opt/local/bin/i686-apple-darwin11-gcc-apple-4.2.1 ld = ld ldshared = /opt/local/bin/i686-apple-darwin11-gcc-apple-4.2.1 -dynamiclib -o3 -ggdb -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 -fno-common -pipe -l. -l/usr/local/lib cflags = -o3 -ggdb -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 -fno-common -pipe xcflags = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -druby_export cppflags = -d_xopen_source -d_darwin_c_source -i. -i.ext/include/i386-darwin11.3.0 -i./include -i. dldflags = -wl,-undefined,dynamic_lookup -wl,-multiply_defined,suppress -wl,-flat_namespace -install_name /users/squantowalks/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -wl,-unexported_symbol,_init_* -wl,-unexported_symbol,*_threadptr_* -wl,-u,_objc_msgsend solibs = linking miniruby ld: warning: ignoring file dmyext.o, file built unsupported file format not architecture being linked (i386) undefined symbols architecture i386: "_init_ext", referenced from: _require_libraries in ruby.o ld: symbol(s) not found architecture i386 collect2: ld returned 1 exit status make: *** [miniruby] error 1 make: *** [miniruby] error 1 architecture being linked (x86_64) ld: warning: ignoring file miniprelude.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file array.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file bignum.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file class.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file compar.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file complex.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file dir.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file dln_find.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file enum.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file enumerator.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file error.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file eval.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file load.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file proc.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file file.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file gc.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file hash.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file inits.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file io.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file marshal.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file math.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file node.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file numeric.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file object.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file pack.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file parse.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file process.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file random.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file range.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file rational.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file re.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file regcomp.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file regenc.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file regerror.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file regexec.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file regparse.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file regsyntax.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file ruby.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file safe.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file signal.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file sprintf.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file st.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file strftime.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file string.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file struct.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file time.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file transcode.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file util.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file variable.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file compile.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file debug.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file iseq.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file vm.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file vm_dump.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file thread.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file cont.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file ascii.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file us_ascii.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file unicode.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file utf_8.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file newline.o, file built i386 not architecture being linked (x86_64) ld: warning: ignoring file setproctitle.o, file built i386 not architecture being linked (x86_64) undefined symbols architecture x86_64: "_main", referenced from: start in crt1.10.6.o ld: symbol(s) not found architecture x86_64 collect2: ld returned 1 exit status make: *** [miniruby] error 1
thoughts?
edit: jared. when add --with-gcc=clang
, log looks like
[2012-03-08 21:20:12] make cc = clang ld = ld ldshared = clang -dynamiclib cflags = -o3 -ggdb -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 -fno-common -pipe xcflags = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -druby_export cppflags = -d_xopen_source -d_darwin_c_source -i. -i.ext/include/x86_64-darwin11.3.0 -i./include -i. dldflags = -wl,-undefined,dynamic_lookup -wl,-multiply_defined,suppress -wl,-flat_namespace -install_name /users/squantowalks/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -wl,-unexported_symbol,_init_* -wl,-unexported_symbol,*_threadptr_* -wl,-u,_objc_msgsend solibs = compiling main.c compiling dmydln.c compiling dmyencoding.c compiling version.c compiling dmyversion.c compiling miniprelude.c compiling array.c compiling bignum.c compiling class.c compiling compar.c compiling complex.c compiling dir.c compiling dln_find.c compiling enum.c compiling enumerator.c compiling error.c compiling eval.c compiling load.c compiling proc.c compiling file.c compiling gc.c compiling hash.c compiling inits.c compiling io.c io.c:997:2: warning: expression result unused [-wunused-value] set_binary_mode(fptr); ^~~~~~~~~~~~~~~~~~~~~ io.c:330:31: note: instantiated from: #define set_binary_mode(fptr) 0 ^ io.c:1953:2: warning: expression result unused [-wunused-value] set_binary_mode(fptr); ^~~~~~~~~~~~~~~~~~~~~ io.c:330:31: note: instantiated from: #define set_binary_mode(fptr) 0 ^ io.c:1975:5: warning: expression result unused [-wunused-value] need_newline_decorator_on_read_check(fptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:331:52: note: instantiated from: #define need_newline_decorator_on_read_check(fptr) 0 ^ io.c:2409:2: warning: expression result unused [-wunused-value] set_binary_mode(fptr); ^~~~~~~~~~~~~~~~~~~~~ io.c:330:31: note: instantiated from: #define set_binary_mode(fptr) 0 ^ io.c:2452:5: warning: expression result unused [-wunused-value] need_newline_decorator_on_read_check(fptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:331:52: note: instantiated from: #define need_newline_decorator_on_read_check(fptr) 0 ^ io.c:2491:2: warning: expression result unused [-wunused-value] set_binary_mode(fptr); ^~~~~~~~~~~~~~~~~~~~~ io.c:330:31: note: instantiated from: #define set_binary_mode(fptr) 0 ^ io.c:2515:5: warning: expression result unused [-wunused-value] need_newline_decorator_on_read_check(fptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:331:52: note: instantiated from: #define need_newline_decorator_on_read_check(fptr) 0 ^ io.c:2652:2: warning: expression result unused [-wunused-value] need_newline_decorator_on_read_check(fptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:331:52: note: instantiated from: #define need_newline_decorator_on_read_check(fptr) 0 ^ io.c:2662:2: warning: expression result unused [-wunused-value] set_binary_mode(fptr); ^~~~~~~~~~~~~~~~~~~~~ io.c:330:31: note: instantiated from: #define set_binary_mode(fptr) 0 ^ io.c:3012:2: warning: expression result unused [-wunused-value] set_binary_mode(fptr); ^~~~~~~~~~~~~~~~~~~~~ io.c:330:31: note: instantiated from: #define set_binary_mode(fptr) 0 ^ io.c:3057:5: warning: expression result unused [-wunused-value] need_newline_decorator_on_read_check(fptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:331:52: note: instantiated from: #define need_newline_decorator_on_read_check(fptr) 0 ^ io.c:3172:2: warning: expression result unused [-wunused-value] set_binary_mode(fptr); ^~~~~~~~~~~~~~~~~~~~~ io.c:330:31: note: instantiated from: #define set_binary_mode(fptr) 0 ^ io.c:3213:5: warning: expression result unused [-wunused-value] need_newline_decorator_on_read_check(fptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:331:52: note: instantiated from: #define need_newline_decorator_on_read_check(fptr) 0 ^ io.c:3417:2: warning: expression result unused [-wunused-value] set_binary_mode(fptr); ^~~~~~~~~~~~~~~~~~~~~ io.c:330:31: note: instantiated from: #define set_binary_mode(fptr) 0 ^ io.c:3437:2: warning: expression result unused [-wunused-value] need_newline_decorator_on_read_check(fptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:331:52: note: instantiated from: #define need_newline_decorator_on_read_check(fptr) 0 ^ io.c:4173:5: warning: expression result unused [-wunused-value] set_binary_mode_with_seek_cur(fptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:333:45: note: instantiated from: #define set_binary_mode_with_seek_cur(fptr) 0 ^ io.c:4696:2: warning: expression result unused [-wunused-value] set_universal_newline_decorator_if_enc2(enc2, ecflags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:332:64: note: instantiated from: #define set_universal_newline_decorator_if_enc2(enc2, ecflags) 0 ^ io.c:4743:2: warning: expression result unused [-wunused-value] set_universal_newline_decorator_if_enc2(enc2, ecflags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:332:64: note: instantiated from: #define set_universal_newline_decorator_if_enc2(enc2, ecflags) 0 ^ io.c:8236:2: warning: expression result unused [-wunused-value] set_universal_newline_decorator_if_enc2(enc2, ecflags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:332:64: note: instantiated from: #define set_universal_newline_decorator_if_enc2(enc2, ecflags) 0 ^ io.c:8243:6: warning: expression result unused [-wunused-value] set_universal_newline_decorator_if_enc2(enc2, ecflags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:332:64: note: instantiated from: #define set_universal_newline_decorator_if_enc2(enc2, ecflags) 0 ^ io.c:8250:3: warning: expression result unused [-wunused-value] set_universal_newline_decorator_if_enc2(enc2, ecflags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:332:64: note: instantiated from: #define set_universal_newline_decorator_if_enc2(enc2, ecflags) 0 ^ io.c:8255:3: warning: expression result unused [-wunused-value] set_universal_newline_decorator_if_enc2(enc2, ecflags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ io.c:332:64: note: instantiated from: #define set_universal_newline_decorator_if_enc2(enc2, ecflags) 0 ^ 22 warnings generated. compiling marshal.c compiling math.c compiling node.c compiling numeric.c compiling object.c compiling pack.c compiling parse.c compiling process.c compiling random.c compiling range.c compiling rational.c compiling re.c compiling regcomp.c compiling regenc.c compiling regerror.c compiling regexec.c compiling regparse.c compiling regsyntax.c compiling ruby.c compiling safe.c compiling signal.c compiling sprintf.c compiling st.c compiling strftime.c compiling string.c compiling struct.c compiling time.c compiling transcode.c compiling util.c compiling variable.c compiling compile.c compiling debug.c compiling iseq.c compiling vm.c compiling vm_dump.c compiling thread.c compiling cont.c compiling ./enc/ascii.c compiling ./enc/us_ascii.c compiling ./enc/unicode.c compiling ./enc/utf_8.c compiling newline.c compiling ./missing/setproctitle.c linking miniruby <internal:prelude>:1: [bug] bus error ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] -- control frame information ----------------------------------------------- c:0003 p:0002 s:0006 b:0006 l:000005 d:000005 top <internal:prelude>:1 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 finish c:0001 p:0000 s:0002 b:0002 l:000e28 d:000e28 top -- ruby level backtrace information ---------------------------------------- <internal:prelude>:1:in `<compiled>' -- c level backtrace information ------------------------------------------- see crash report log file under ~/library/logs/crashreporter or /library/logs/crashreporter, more detail of. -- other runtime information ----------------------------------------------- * loaded script: ./miniruby * loaded features: 0 enumerator.so [note] may have encountered bug in ruby interpreter or extension libraries. bug reports welcome. details: http://www.ruby-lang.org/bugreport.html make: *** [.rbconfig.time] abort trap: 6
edit: guys :), figured out. here's sparknotes version of did:
(if you're unfamiliar command line, http://jewelrybox.unfiniti.com/ godsend).
- install rvm (https://rvm.beginrescueend.com/ ) manages multiple versions of ruby @ same time on 1 comp (mac/linux only). makes folders different versions of ruby can work independently in (from understand).
get xcode (https://developer.apple.com/xcode/ ) needed compile code together. but, need gcc, doesn't come packaged latest version of xcode. soo....
went here (https://developer.apple.com/downloads/index.action ) , downloaded "command line tools xcode" simple , straightforward run.
installed macports (http://www.macports.org/install.php ) could...
install make (port install make ) through terminal. not sure does, terminal gave , error before installing, , no error afterwards.
and we're ready rock :)
run (rvm install 1.9.3) hang out bit. takes while.
then (rvm 1.9.3 --default)
then (gem install rails) install ruby on rails. takes while.
once set rails 3, made test app. (rails new tester) - builds directory (cd tester)- moves new directory
(rails server) -sets server
then, hop on internet , visit (http://localhost:3000). if goes well, should see welcome rails in browser.
i ran issue myself, , seem issue how ruby-1.9.3-125 works clang. once run against gcc worked charm.
check make sure have actual gcc installed which gcc-4.2
. if isn't you'll need install xcode or akin os x gcc installer. if installed running rvm install 1.9.3 --with-gcc=gcc-4.2
did trick me.
Comments
Post a Comment