1

혼란스러워. 그것은 나를위한 일상적인 업무이지만 특히이 경우에는 동료의 stackoverflowers (stackoverflowers가 아닌 stackoverflower)에 손을 내밀 수 있다고 느꼈습니다.레오파드 => 스노우 레오파드 아키텍처와 함께 노코 기리/레일

uname -a 
Darwin macbookpro 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386 

set 

bash-3.2$ set 
... 
HOSTTYPE=x86_64 
... 
MACHTYPE=x86_64-apple-darwin10.0 
... 

나는 몇 가지 기본 루비 보석을 재건 악몽을 보내고있어 나는이 문제의 일부인지 궁금하네요 -이 기계의 일부는 멀리는 64 비트하지만 다른 부분 (32)을 말한다 ... 나는 말할 수있다?

'이 Mac 정보'에서 Apple이 말하는 64 비트는 'Intel Core 2 Duo'입니다. 그렇다면 왜, 이후에

sudo gem pristine --all 

나는 아직도 이런 종류의 오류가 발생합니까?

dlopen(/Applications/Rails/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/lib/nokogiri/nokogiri.bundle, 9): no suitable image found. Did find: 
/Applications/Rails/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/lib/nokogiri/nokogiri.bundle: mach-o, but wrong architecture - /Applications/Rails/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/lib/nokogiri/nokogiri.bundle 

특히 nokogiri를 제거하고 다시 설치했습니다. 출력에 오류가 없습니다.

bash-3.2$ sudo gem install nokogiri 
Building native extensions. This could take a while... 
Successfully installed nokogiri-1.4.2 
1 gem installed 

감사합니다.

UPDATE는

나는 비슷한 문제에 useful post by Chris Noos 발견했습니다.

cd /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/

다음라는 파일 wem_extconf.rb했다 : 나는 곳이다

require 'mkmf' 
find_library('xml2', 'xmlParseDoc') 
dir_config('any-string-here', '/opt/local/include', '/opt/local/lib') 
find_library('xml2', 'xmlParseDoc') 

sudo web_extconf.rb

checking for xmlParseDoc() in -lxml2... no 
checking for xmlParseDoc() in -lxml2... no 

를 생산 실행을 ???? 그러나 잠깐만, 그것은이 :

$ port installed | grep libxml2.*active 
libxml2 @2.7.7_0+universal (active) 

$ ls -l /opt/local/lib | grep libxml2 
-rwxr-xr-x 2 root admin 2623276 31 May 20:09 libxml2.2.dylib 
-rw-r--r-- 2 root admin 3643928 31 May 20:09 libxml2.a 
lrwxr-xr-x 1 root admin  15 31 May 20:09 libxml2.dylib -> libxml2.2.dylib 
-rwxr-xr-x 2 root admin  975 31 May 20:09 libxml2.la 

그리고 내가 몇 가지 물건의 사본이 나타나지 않습니다 -하지만를하지 않도록한다 (I, 그것은 MacPorts를의 주어진 있으리라 믿고있어이/옵션의 사용 설치된 하나 개의 포트?)

$ ls -l /usr/lib | grep libxml2 
lrwxr-xr-x 1 root wheel  15 23 May 16:07 libxml2.2.7.3.dylib -> libxml2.2.dylib 
-rwxr-xr-x 1 root wheel 3758272 22 Sep 2009 libxml2.2.dylib 
lrwxr-xr-x 1 root wheel  15 23 May 16:07 libxml2.dylib -> libxml2.2.dylib 

$ ls -l /usr/local/lib | grep libxml2 
-rwxr-xr-x 1 root admin 1456292 30 Oct 2009 libxml2.2.dylib 
-rw-r--r-- 1 root admin 4812456 30 Oct 2009 libxml2.a 
-rwxr-xr-x 1 root admin 1456292 30 Oct 2009 libxml2.dylib 
-rwxr-xr-x 1 root admin  951 30 Oct 2009 libxml2.la 

답변

0

Xcode 개발 도구를 설치 했습니까?

+0

네, 토비에게 묻습니다. Xcode 3.2 (Snow Leopard 버전)를 설치했습니다. –

1

Snow Leopard에서 gcc의 오해의 소지가 있습니다. i386 커널을 실행하더라도 gcc은 기본적으로 64 비트 바이너리를 생성합니다.

대상 아키텍처를 지정하는 방법을 보려면 GEM 문서를 보았습니까?

관련 문제