bonum_cete
bonum_cete

Reputation: 4962

Need help installing Ruby 1.9.2 on Mac OSX 10.7

I have been struggling with this issue for about 10 hours straight. I really hope there is somebody in here that can help. I have probably already looked at every possible solution on this site and many others.

I am following along with the ruby.railstutorial.org tutorial. I am now the part where I install ruby 1.8.7 and 1.9.2. When I run rvm install 1.9.2 I get:

Below this is the error from my make.log. Please let me know if there is anything else I can tell.

Installing Ruby from source to: /Users/user/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...

ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #extracted to /Users/user/.rvm/src/ruby-1.9.2-p290 (already extracted)
Fetching yaml-0.1.4.tar.gz to /Users/user/.rvm/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  460k  100  460k    0     0   394k      0  0:00:01  0:00:01 --:--:--  601k
Extracting yaml-0.1.4.tar.gz to /Users/user/.rvm/src
Configuring yaml in /Users/user/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/user/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/user/.rvm/usr
ruby-1.9.2-p290 - #configuring 
ruby-1.9.2-p290 - #compiling 
ERROR: Error running 'make ', please read /Users/user/.rvm/log/ruby-1.9.2-p290/make.log
ERROR: There has been an error while running make. Halting the installation.

This is what is in the make.log:

/usr/bin/gcc-4.2 -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long  -fno-common -pipe -L.  -Wl,-u,_objc_msgSend   main.o dmydln.o dmyencoding.o dmyversion.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o dln_find.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o  dmyext.o -lpthread -ldl -lobjc  -o miniruby
ld: warning: ignoring file dmyext.o, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
  "_Init_ext", referenced from:
      _require_libraries in ruby.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [miniruby] Error 1

Here is my .bash_profile

env CC="/usr/bin/gcc-4.2" ARCHFLAGS="-arch x86_64" ARCHS="x86_64" $*
export CC=/usr/bin/gcc-4.2
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
[[ -s "/Users/user/.rvm/scripts/rvm" ]] && source "/Users/user/.rvm/scripts/rvm"  # This loads RVM into a shell session.

Upvotes: 3

Views: 1906

Answers (2)

Casper
Casper

Reputation: 34308

Since from your log files it looks like dmyext.o was not part of the last build process it is possible it's a leftover from an earlier (failed) build. To make sure you start clean:

  1. rm -rf ~/.rvm
  2. Reinstall rvm
  3. env ARCHFLAGS="-arch x86_64" rvm install 1.9.2

EDIT:

Also add this to your .rvmrc as was pointed out by James:

export rvm_archflags="-arch x86_64"

Upvotes: 3

jschorr
jschorr

Reputation: 3054

Try:

env ARCHFLAGS="-arch x86_64" rvm install 1.9.2

Upvotes: 1

Related Questions