2

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
Tobias
  • 21
  • 2

1 Answers1

0

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

ben
  • 1,819
  • 15
  • 25
  • Thanks for your help! tried this, using this command: "$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)". After a successful installation I tried running the rb-appscript command again, with no luck. Is it possible, that the problem comes from my xCode? (4.2.1 installed) <- read somewhere, that this might have problems with ruby?! Any idea how to fix it? – Tobias Dec 18 '11 at 14:25
  • I'm not on OSX, so can't help with that. are you using a ruby version installed by rvm? try 'rvm install 1.8.7' and 'rvm 1.8.7' to see if everything works right. – ben Dec 18 '11 at 18:19
  • Did a complete reinstall of Lion, which fixed my problem. Guess it was somehow connected to previously installed xCode Versions on Leopard and Snow Leopard. Thanks for your help @ben! – Tobias Dec 19 '11 at 21:02