12

I've been working on installing Ruby on my mac, OSX Lion. I've installed XCode, GCC, Readline, Homebrew, and JewleryBox, but I have no idea what's going on. Any pointers?

Here's what my terminal says?

hugo-pc:ruby-1.9.3-p125 squantowalks$ rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/squantowalks/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /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 from source to: /Users/squantowalks/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...

ruby-1.9.3-p125 - #fetching 
ruby-1.9.3-p125 - #extracted to /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 an error while running make. Halting the installation.

Here's the 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, for the more detail of.

-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make: *** [.rbconfig.time] Abort trap: 6

Thanks :)

Edit: After installing macports and 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 to /Users/squantowalks/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /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 from source to: /Users/squantowalks/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...

ruby-1.9.3-p125 - #fetching 
ruby-1.9.3-p125 - #extracted to /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 an error while running make. Halting the installation.

Here's the 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 was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
  "_Init_ext", referenced from:
      _require_libraries in ruby.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make: *** [miniruby] Error 1

make: *** [miniruby] Error 1
he architecture being linked (x86_64)
ld: warning: ignoring file miniprelude.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file array.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file bignum.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file class.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file compar.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file complex.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file dir.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file dln_find.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file enum.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file enumerator.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file error.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file eval.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file load.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file proc.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file file.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file gc.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file hash.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file inits.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file io.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file marshal.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file math.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file node.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file numeric.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file object.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file pack.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file parse.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file process.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file random.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file range.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file rational.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file re.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file regcomp.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file regenc.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file regerror.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file regexec.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file regparse.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file regsyntax.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file ruby.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file safe.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file signal.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file sprintf.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file st.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file strftime.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file string.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file struct.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file time.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file transcode.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file util.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file variable.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file compile.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file debug.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file iseq.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file vm.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file vm_dump.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file thread.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file cont.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file ascii.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file us_ascii.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file unicode.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file utf_8.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file newline.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file setproctitle.o, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [miniruby] Error 1

Thoughts?

Edit: Jared. When I add --with-gcc=clang , the 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, for the more detail of.

-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make: *** [.rbconfig.time] Abort trap: 6

Edit: Thanks for all your help guys :), finally figured it out. Here's the sparknotes version of what I did:

(If you're unfamiliar with the command line, http://jewelrybox.unfiniti.com/ is a godsend).

  1. Install RVM (https://rvm.beginrescueend.com/ ) It manages multiple versions of Ruby at the same time on one comp (mac/linux only). Makes folders that different versions of Ruby can work independently in (from what I understand).
  2. Get XCode (https://developer.apple.com/xcode/ ) Needed to compile code together. But, you also need gcc, which doesn't come packaged with the latest version of XCode. Soo....

  3. Went here (https://developer.apple.com/downloads/index.action ) and downloaded "Command Line Tools For XCode" Simple and straightforward to run.

  4. Installed Macports (http://www.macports.org/install.php ) so that I could...

  5. Install make (port install make ) through the terminal. Not sure what it does, but the terminal gave and error before installing, and no error afterwards.

And NOW we're ready to rock :)

run (rvm install 1.9.3) Hang out for a bit. It takes a while.

Then (rvm 1.9.3 --default)

Then (gem install rails) To install Ruby on Rails. This also takes a while.

Once I was set up with rails 3, I made a test app. (rails new tester) - builds the directory (cd tester)- moves to the new directory

(rails server) -sets up the server

Then, hop on the internet and visit (http://localhost:3000). If all goes well, you should see welcome to rails in your browser.

Squanto
  • 123
  • 1
  • 1
  • 6
  • Do you have the log file under "~/Library/Logs/CrashReporter" or "/Library/Logs/CrashReporter"? – Eric Mar 08 '12 at 23:33
  • Hmm, no. I do have a log folder though. Thanks :) – Squanto Mar 09 '12 at 01:36
  • Please try the steps in [my answer in the question 'Issue updating Ruby on Mac with Xcode 4.3.1'][SO]? I want to know the result. I guess the important point is installing iconv with rvm. [SO]: http://stackoverflow.com/questions/9651670/issue-updating-ruby-on-mac-with-xcode-4-3-1/9651747#9651747 Lately, I don't have issues like this when I use above steps to install. I also tried osx-gcc-installed but it does not work in my case. – shigeya Mar 25 '12 at 06:03

4 Answers4

14

I just ran into this issue myself, and it seem to be an issue with how ruby-1.9.3-125 works with clang. Once I run it against gcc it worked like a charm.

Check to make sure you have the actual gcc installed with which gcc-4.2. If it isn't you'll need to install Xcode or something akin to the os x gcc installer. If it is installed running rvm install 1.9.3 --with-gcc=gcc-4.2 is what did the trick for me.

Alex Lemanski
  • 160
  • 1
  • 6
  • After trying all of the above answers, these instructions are the only ones that worked for me on 3/21/2012. FYI I'm on Xcode 4.3.1, Lion 10.7.3 and I have the osx gcc installer as Alex suggests. – Rob S. Mar 21 '12 at 22:28
  • I've tried C=/path/to/apple-gcc-4.2 rvm install 1.9.3 and it didn't work. but this works for me. thanks – ahmy Apr 09 '12 at 12:55
5

You can theoretically use the clang compiler that ships with modern XCode to build Ruby 1.9.3, but it isn't officially supported. Given you hit a segfault, my guess is that you hit some bug with the pairing.

Instead, install the apple GCC 4.2 - should be the apple-gcc42 brew - and install with CC=/path/to/apple-gcc-4.2 rvm install 1.9.3 instead.

Daniel Pittman
  • 16,733
  • 4
  • 41
  • 34
  • 'hugo-pc:Users squantowalks$ rvm install apple-gcc42 Already installed ruby-1.8.7-p358. To reinstall use: rvm reinstall apple-gcc42 hugo-pc:Users squantowalks$ rvm reinstall apple-gcc42 The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.' ? – Squanto Mar 08 '12 at 23:40
  • You need to use homebrew to install the `apple-gcc42` compiler, not RVM. Then use that to compile Ruby when RVM installs it. – Daniel Pittman Mar 08 '12 at 23:42
  • This is not true, [LLVM & clang are supported as of 1.9.3-p125](http://www.ruby-lang.org/en/news/2012/02/16/ruby-1-9-3-p125-is-released/). – Andrew Marshall Mar 08 '12 at 23:56
  • @AndrewMarshall - awesome, thanks for correcting me. I hadn't caught up with that as official rather than "at your own risk, but probably works", so that is grand. – Daniel Pittman Mar 09 '12 at 00:00
  • You requested building with '/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/libexec/gcc/i686-apple-darwin11/4.2.1' but it is not in your path. (I see that it's installed there though. hmm) – Squanto Mar 09 '12 at 00:05
  • @DanielPittman Well then again "official" doesn't necessarily mean "works all the time" `;)` – Andrew Marshall Mar 09 '12 at 00:06
  • I use macports, to it was just `sudo port install apple-gcc42; CC=/opt/local/bin/apple-gcc42 rvm install ...` for me. I don't know what the right way to make that work is with Homebrew, although I bet there is a way to make it so. – Daniel Pittman Mar 09 '12 at 00:06
5

As of Ruby 1.9.3p-125 Clang is officially supported, so you should be able to just do:

rvm install 1.9.3 --with-gcc=clang
jaredonline
  • 2,912
  • 2
  • 17
  • 24
  • That's wired. I get: Error running 'make ', please read /Users/squantowalks/.rvm/log/ruby-1.9.3-p125/make.log There has been an error while running make. Halting the installation. – Squanto Mar 09 '12 at 02:21
  • Unfortunately this doesn't work for me giving the same error. Has anybody been able to compile it? – Dmytrii Nagirniak Mar 09 '12 at 02:30
  • Sorry, not sure why it's not working. You might need to use `sudo` as well. – jaredonline Mar 09 '12 at 03:56
  • Sorry @Squanto I don't have anymore advice. Adding the `--with-gcc=clang` tag worked for me on Lion. – jaredonline Mar 12 '12 at 17:57
  • Thanks for the help :), I finally got it. I wrote up what I did at the end of the original post for anyone else who wants to see. – Squanto Mar 15 '12 at 15:46
0

Use 1.9.3-head, the bug is fixed in it https://bugs.ruby-lang.org/issues/6080

naruse
  • 176
  • 3