install curb gem on Ruby - ruby

I'm getting this error when trying to install curb on my Mac:
/usr/bin/gcc-4.2 -dynamic -bundle -o curb_core.bundle curb.o curb_easy.o curb_errors.o curb_multi.o curb_postfield.o curb_upload.o -L. -L/Users/user/.rvm/rubies/ruby-1.9.2-p318/lib -L/Users/user/.rvm/usr/lib -L. -L/usr/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc -lcurl
ld: in /usr/local/lib/libssl.0.9.8.dylib, missing required architecture x86_64 in file for architecture x86_64
collect2: ld returned 1 exit status
make: *** [curb_core.bundle] Error 1
Any suggestions?

seems you need to have 64 bit openssl
check this
Trouble installing pg gem

Related

How to install gbarcode gem to Ubuntu?

I've problem with gbarcode gem which has dependency gnu-barcode c application.
When trying to say gem install gbarcode it says:
Building native extensions. This could take a while...
ERROR: Error installing gbarcode-linux:
ERROR: Failed to build gem native extension.
/home/user/.rvm/rubies/ruby-1.8.7-p357/bin/ruby extconf.rb
checking for main() in -lbarcode... yes
creating Makefile
make
gcc -I. -I. -I/home/user/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -c barcode_wrap.c
gcc -shared -o gbarcode.so barcode_wrap.o -L. -L/home/user/.rvm/rubies/ruby-1.8.7-p357/lib -Wl,-R/home/user/.rvm/rubies/ruby-1.8.7-p357/lib -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/user/.rvm/rubies/ruby-1.8.7-p357/lib -L/home/user/.rvm/rubies/ruby-1.8.7-p357/lib -lruby -lbarcode -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libbarcode.a(library.o): relocation R_X86_64_32 against `encodings' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libbarcode.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [gbarcode.so] Error 1
I've tried to install gnu-barcode application from ubuntu software center, apt-get and directly from source http://www.gnu.org/software/barcode/ and the response is always the same.
How should I install gnu barcode so that it's working with the gem.
And yes this project is quite heavy dependent on that gem so replacing it would be really painful to all parties.

CocoaPods installation issue using Xcode 5 and Xcode 4.6.3

After this command sudo gem install cocoapods I got error below.
I think it is connected to the wrong path for Xcode 5. When I installed it I save it on Desktop but them moved it to the Application folder. I use Xcode 4.6.3 as well as Xcode 5. How can I change path to solve this issue. Command line tools are installed on both XCodes.
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile
make
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -DJSON_GENERATOR -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -O3 -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c generator.c
xcrun: Error: could not stat active Xcode path '/Users/alex/Desktop/Xcode 5.app/Contents/Developer'. (No such file or directory)
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o generator.bundle generator.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl -lobjc
clang: error: no such file or directory: 'generator.o'
make: *** [generator.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/json-1.8.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
I have run this command in terminal
sudo xcode-select -switch /Applications/Xcode.app
it works for me

Make Error while Installing Ruby 1.9.2-180

/usr/bin/gcc-4.2 -dynamic -bundle -o ../../.ext/x86_64-darwin11.3.0/tcltklib.bundle
stubs.o tcltklib.o -L. -L../.. -L/Users/jasonvdm/.rvm/usr/lib - L/System/Library/Frameworks/Tcl.framework -L/System/Library/Frameworks/Tk.framework -L. -L/usr/local/lib -lpthread -framework CoreFoundation -F/System/Library/Frameworks -framework Tcl -lpthread -framework CoreFoundation -framework Cocoa -framework Carbon -framework IOKit -lpthread -framework CoreFoundation -F/System/Library/Frameworks -framework Tk -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lm -ldl -lpthread -ldl -lobjc
ld: in /usr/local/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../.ext/x86_64-darwin11.3.0/tcltklib.bundle] Error 1
make: *** [mkmain.sh] Error 1
I'm getting a make error:
Error running 'make', please read /Users/jasonvdm/.rvm/log/ruby-1.9.2-p320/make.log
There has been an error while running make. Halting the installation.
This is the same for p180. I have installed readline and everything already. I'm trying to install 1.9.3, with similar errors. I've tried installing with clang and readline flags, nothing works.
It appears that this is my main error:
ld: in /usr/local/lib/libxslt.1.dylib, file was built for unsupported file format which
is not the architecture being linked (x86_64) for architecture x86_64
Are you using OSX??
You can try use:
rvm install ruby-1.9.2-p320 --with-gcc=clang
Or:
CC=/usr/local/bin/gcc-4.2 rvm install ruby-1.9.2-p320

ERROR while installing rb-appscript

Got a big problem installing rb-appscript.
I already installed the latest Version of xCode & I'm running Lion.
Hope you can help me, thanks a lot!
This is the Error Message:
sudo gem install rb-appscript
Building native extensions. This could take a while...
ERROR: Error installing rb-appscript:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
create /usr/local/lib/ruby/gems/1.8/gems/rb-appscript-0.6.1/src/osx_ruby.h ...
create /usr/local/lib/ruby/gems/1.8/gems/rb-appscript-0.6.1/src/osx_intern.h ...
creating Makefile
make
Makefile:188: warning: overriding commands for target `/usr/local/lib/ruby/gems/1.8/gems/rb-appscript-0.6.1/lib'
Makefile:182: warning: ignoring old commands for target `/usr/local/lib/ruby/gems/1.8/gems/rb-appscript-0.6.1/lib'
gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin9.7.0 -I/usr/local/lib/ruby/1.8/i686-darwin9.7.0 -Isrc -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -fno-common -pipe -fno-common -Wall -c src/rbae.c
gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin9.7.0 -I/usr/local/lib/ruby/1.8/i686-darwin9.7.0 -Isrc -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -fno-common -pipe -fno-common -Wall -c src/SendThreadSafe.c
cc -dynamic -bundle -undefined suppress -flat_namespace -o ae.bundle rbae.o SendThreadSafe.o -L. -L/usr/local/lib -L. -framework Carbon -framework ApplicationServices -lruby -lpthread -ldl -lobjc
ld: warning: ignoring file /usr/local/lib/libruby.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: in /usr/local/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture x86_64
collect2: ld returned 1 exit status
make: *** [ae.bundle] Error 1
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/rb-appscript-0.6.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/rb-appscript-0.6.1/./gem_make.out
Seems like something is wrong with your Ruby install. It complains about a wrong architecture here
ld: warning: ignoring file /usr/local/lib/libruby.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: in /usr/local/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture x86_64
Be sure your ruby is installed right. For a super-easy Ruby installation, I would recommend the Ruby Version Manager -> https://rvm.io

Error running make when installing Ruby 1.8.7-p302 via RVM on Mac OS 10.5.8

Running "rvm install 1.8.7-p302" provides the following feedback:
rich-macbook:~ rich$ rvm install 1.8.7-p302
Installing Ruby from source to: /Users/rich/.rvm/rubies/ruby-1.8.7-p302, this may take a while depending on your cpu(s)...
ruby-1.8.7-p302 - #fetching
ruby-1.8.7-p302 - #extracted to /Users/rich/.rvm/src/ruby-1.8.7-p302 (already extracted)
Applying patch 'stdout-rouge-fix' (located at /Users/rich/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
ERROR: Error running 'patch -F 25 -p1 -N -f <"/Users/rich/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"', please read /Users/rich/.rvm/log/ruby-1.8.7-p302/patch.apply.stdout-rouge-fix.log
ruby-1.8.7-p302 - #configuring
ruby-1.8.7-p302 - #compiling
ERROR: Error running 'make ', please read /Users/rich/.rvm/log/ruby-1.8.7-p302/make.log
ERROR: There has been an error while running make. Halting the installation.
This is the second attempt at installing it; the first time the patch installed fine, but Ruby itself failed running make. I have recently installed Ruby 1.9.3-p0 without problem.
Below is the output of the mentioned log files.
patch.apply.stdout-rouge-fix.log
[2011-12-01 08:06:45] patch -F 25 -p1 -N -f <"/Users/rich/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"
patching file lib/mkmf.rb
Hunk #1 FAILED at 201.
1 out of 1 hunk FAILED -- saving rejects to file lib/mkmf.rb.rej
make.log:
[2011-12-01 08:07:04] make
/usr/bin/gcc-4.2 -arch x86_64 -g -Os -pipe -no-cpp-precomp -fno-common -pipe -fno-common -DRUBY_EXPORT -L. -arch x86_64 -bind_at_load main.o dmydln.o libruby-static.a -ldl -lobjc -o miniruby
rbconfig.rb unchanged
cc -dynamiclib -undefined suppress -flat_namespace -install_name /Users/rich/.rvm/rubies/ruby-1.8.7-p302/lib/libruby.dylib -current_version 1.8.7 -compatibility_version 1.8 array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o version.o dmyext.o -o libruby.1.8.7.dylib
ld warning: in array.o, file is not of required architecture
ld warning: in bignum.o, file is not of required architecture
ld warning: in class.o, file is not of required architecture
ld warning: in compar.o, file is not of required architecture
ld warning: in dir.o, file is not of required architecture
ld warning: in dln.o, file is not of required architecture
ld warning: in enum.o, file is not of required architecture
ld warning: in enumerator.o, file is not of required architecture
ld warning: in error.o, file is not of required architecture
ld warning: in eval.o, file is not of required architecture
ld warning: in file.o, file is not of required architecture
ld warning: in gc.o, file is not of required architecture
ld warning: in hash.o, file is not of required architecture
ld warning: in inits.o, file is not of required architecture
ld warning: in io.o, file is not of required architecture
ld warning: in marshal.o, file is not of required architecture
ld warning: in math.o, file is not of required architecture
ld warning: in numeric.o, file is not of required architecture
ld warning: in object.o, file is not of required architecture
ld warning: in pack.o, file is not of required architecture
ld warning: in parse.o, file is not of required architecture
ld warning: in process.o, file is not of required architecture
ld warning: in prec.o, file is not of required architecture
ld warning: in random.o, file is not of required architecture
ld warning: in range.o, file is not of required architecture
ld warning: in re.o, file is not of required architecture
ld warning: in regex.o, file is not of required architecture
ld warning: in ruby.o, file is not of required architecture
ld warning: in signal.o, file is not of required architecture
ld warning: in sprintf.o, file is not of required architecture
ld warning: in st.o, file is not of required architecture
ld warning: in string.o, file is not of required architecture
ld warning: in struct.o, file is not of required architecture
ld warning: in time.o, file is not of required architecture
ld warning: in util.o, file is not of required architecture
ld warning: in variable.o, file is not of required architecture
ld warning: in version.o, file is not of required architecture
ld warning: in dmyext.o, file is not of required architecture
compiling Win32API
compiling bigdecimal
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/bigdecimal.bundle bigdecimal.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling curses
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/curses.bundle curses.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -lncurses -ltermcap -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling dbm
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/dbm.bundle dbm.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling digest
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/digest.bundle digest.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
cp ../.././ext/digest/digest.h ../../.ext/i686-darwin9.8.0
compiling digest/bubblebabble
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/bubblebabble.bundle bubblebabble.o -L. -L../../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling digest/md5
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/md5.bundle md5init.o md5ossl.o -L. -L../../.. -L. -arch x86_64 -bind_at_load -lruby -lcrypto -ldl -lobjc
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling digest/rmd160
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/rmd160.bundle rmd160init.o rmd160ossl.o -L. -L../../.. -L. -arch x86_64 -bind_at_load -lruby -lcrypto -ldl -lobjc
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling digest/sha1
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/sha1.bundle sha1init.o sha1ossl.o -L. -L../../.. -L. -arch x86_64 -bind_at_load -lruby -lcrypto -ldl -lobjc
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling digest/sha2
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/sha2.bundle sha2.o sha2init.o -L. -L../../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling dl
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/dl.bundle dl.o handle.o ptr.o sym.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
cp dlconfig.h ../../.ext/i686-darwin9.8.0
cp ../.././ext/dl/dl.h ../../.ext/i686-darwin9.8.0
compiling etc
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/etc.bundle etc.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling fcntl
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/fcntl.bundle fcntl.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling gdbm
compiling iconv
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/iconv.bundle iconv.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -liconv -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling io/wait
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/io/wait.bundle wait.o -L. -L../../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling nkf
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/nkf.bundle nkf.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling openssl
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/openssl.bundle openssl_missing.o ossl.o ossl_asn1.o ossl_bio.o ossl_bn.o ossl_cipher.o ossl_config.o ossl_digest.o ossl_engine.o ossl_hmac.o ossl_ns_spki.o ossl_ocsp.o ossl_pkcs12.o ossl_pkcs5.o ossl_pkcs7.o ossl_pkey.o ossl_pkey_dh.o ossl_pkey_dsa.o ossl_pkey_ec.o ossl_pkey_rsa.o ossl_rand.o ossl_ssl.o ossl_ssl_session.o ossl_x509.o ossl_x509attr.o ossl_x509cert.o ossl_x509crl.o ossl_x509ext.o ossl_x509name.o ossl_x509req.o ossl_x509revoked.o ossl_x509store.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -lssl -lcrypto -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling pty
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/pty.bundle pty.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -lutil -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling racc/cparse
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/racc/cparse.bundle cparse.o -L. -L../../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling readline
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/readline.bundle readline.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -lreadline -lncurses -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling sdbm
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/sdbm.bundle _sdbm.o init.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling socket
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/socket.bundle socket.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling stringio
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/stringio.bundle stringio.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling strscan
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/strscan.bundle strscan.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling syck
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/syck.bundle bytecode.o emitter.o gram.o handler.o implicit.o node.o rubyext.o syck.o token.o yaml2byte.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling syslog
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/syslog.bundle syslog.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling thread
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/thread.bundle thread.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling tk
Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options.
compiling tk/tkutil
compiling win32ole
compiling zlib
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/zlib.bundle zlib.o -L. -L../.. -L. -arch x86_64 -bind_at_load -lruby -lz -ldl -lobjc
ld warning: in ../../libruby.dylib, file is not of required architecture
making ruby
/usr/bin/gcc-4.2 -arch x86_64 -g -Os -pipe -no-cpp-precomp -fno-common -pipe -fno-common -DRUBY_EXPORT -L. -arch x86_64 -bind_at_load main.o -lruby -ldl -lobjc -o ruby
ld warning: in ./libruby.dylib, file is not of required architecture
Undefined symbols:
"_ruby_options", referenced from:
_main in main.o
"_ruby_run", referenced from:
_main in main.o
"_ruby_init", referenced from:
_main in main.o
"_ruby_init_stack", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [ruby] Error 1
make: *** [all] Error 2
If you need any more info, let me know.
EDIT: I performed the following steps after reading this thread: make error when installing `ruby-1.8.7-p334` with `rvm` on Snow Leopard
rvm pkg install readline
rvm remove 1.8.7
rvm cleanup all
rvm install ruby-1.8.7-p302
This successfully installed the patch, indicating it is installed first time so any subsequent errors can be ignored. It did still error when compiling Ruby. As the make log file exceeds this post's character count capacity, you can view the contents of the second makefile here: http://pastebin.com/MTZjXBdF
Did not work with the latest release. However could get it to work by forcing it to use the rvm installed readline.
rvm install 1.8.7 -C –with-readline-dir=$rvm_path/usr
So complete steps are:
rvm pkg install readline
rvm remove 1.8.7
rvm cleanup all
rvm install 1.8.7 -C –with-readline-dir=$rvm_path/usr
Thanks to Andrew at http://anlek.com/2011/01/rvm-install-1-8-7-p330-fails/ for the pointer.
I just tested it with both linux and OSX, it seems to be fixed already:
rvm get head
rvm install 1.8.7-p302 --autolibs=3
Also consider upgrading to ruby-2.0.0 - the 1.8 tree will be no more maintained in few months.

Resources