2010-03-16 6 views
0

Mac OSX Snow Leopard를 실행 중입니다.이 문제는 최근 train wreck에서 RVM을 사용하지 않고 루비를 업데이트했기 때문에 발생합니다. RVM을 올바르게 설치/실행하려고 시도했지만 제대로 작동하지 않습니다.Snow Leopard sqlite3-ruby 설치 문제

sqlite3-ruby gem을 설치할 수 없습니다. 다음이 나타납니다 오류 : sqlite3-ruby 설치 오류 : 오류 : gem 네이티브 확장을 빌드하지 못했습니다.

어떻게 수정합니까?

$ which ruby 
/usr/local/bin/ruby 
$ whereis ruby 
/usr/bin/ruby 
$ which rails 
/usr/local/bin/rails 
$ whereis rails 
/usr/bin/rails 
$ which gem 
/usr/local/bin/gem 
$ whereis gem 
/usr/bin/gem 
$ ruby -v 
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin10.2.0] 
$ rails -v 
Rails 2.3.5 
$ gem list 

*** LOCAL GEMS *** 

actionmailer (2.3.5) 
actionpack (2.3.5) 
activerecord (2.3.5) 
activeresource (2.3.5) 
activesupport (2.3.5) 
builder (2.1.2) 
bundler (0.9.11) 
columnize (0.3.1) 
erubis (2.6.5) 
fastercsv (1.5.1) 
ffi (0.6.3) 
gbarcode (0.98.16) 
i18n (0.3.5) 
linecache (0.43) 
mail (2.1.3) 
memcache-client (1.8.0) 
prawn (0.8.4) 
prawn-core (0.8.4) 
prawn-layout (0.8.4) 
prawn-security (0.8.4) 
rack (1.1.0, 1.0.1) 
rack-mount (0.6.1) 
rack-test (0.5.3) 
rails (2.3.5) 
rake (0.8.7) 
ruby-debug (0.10.3) 
ruby-debug-base (0.10.3) 
rubygems-update (1.3.6) 
sqlite3 (0.0.8) 
text-format (1.0.0) 
thor (0.13.4) 
tzinfo (0.3.17) 

$ sudo gem install sqlite3-ruby 
Password: 
Building native extensions. This could take a while... 
ERROR: Error installing sqlite3-ruby: 
    ERROR: Failed to build gem native extension. 

/usr/local/bin/ruby extconf.rb 
checking for fdatasync() in -lrt... no 
checking for sqlite3.h... yes 
checking for sqlite3_open() in -lsqlite3... no 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
    --with-opt-dir 
    --without-opt-dir 
    --with-opt-include 
    --without-opt-include=${opt-dir}/include 
    --with-opt-lib 
    --without-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/usr/local/bin/ruby 
    --with-sqlite3-dir 
    --without-sqlite3-dir 
    --with-sqlite3-include 
    --without-sqlite3-include=${sqlite3-dir}/include 
    --with-sqlite3-lib 
    --without-sqlite3-lib=${sqlite3-dir}/lib 
    --with-rtlib 
    --without-rtlib 
    --with-sqlite3lib 
    --without-sqlite3lib 


Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5 for inspection. 
Results logged to /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/ext/sqlite3_api/gem_make.out 

프로필 : 당신은 엑스 코드를 설치해야

export MANPATH=/opt/local/share/man:$MANPATH  
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" 
if [[ -s /Users/justinz/.rvm/scripts/rvm ]] ; then source /Users/justinz/.rvm/scripts/rvm ; fi 
+0

이 문제를 해결하기 위해 sqlite3 gem을 제거하고 sqlite3-ruby gem을 설치했습니다 –

+0

다음을 시도하십시오 : http://stackoverflow.com/questions/1373108/snow-leopard-sqlite3-ruby – devth

+0

그는 여전히 1.8, 그 링크는 아마도 차이를 만들지 않을 것입니다. 아직 설치되지 않은 개발자 도구와 관련이 있다고 확신합니다. – Garrett

답변

1

sqlite3 gem을 제거한 다음 다시 시도하십시오. sqlite3과 sqlite3-ruby는 호환되지 않습니다. 그렇지 않으면 결과 파일을 질문에 추가하여 컴파일이 발생했을 때 잘못된 점을 알 수 있습니다.

+0

JZ, 이것을 확인하는 기회가 있었습니까?) – corprew

+0

이 문제를 해결하십시오. sqlite3 gem을 제거하고 sqlite3-ruby gem을 설치했습니다 –

+0

제거한 다음 다시 설치하십시오 :) –

0

. developer.apple.com에서 무료로 다운로드 할 수 있습니다.

+0

xcode를 다시 설치했는데 문제가되지 않았습니다. (쉬운 픽스 였을 것입니까? –

0

나는 sqlite3 보석을 설치하지 않고도 거의 같은 오류가 발생했다. macports (및 종속성도 포함)가있는 sqlite3을 제거했습니다. 제거한 후 sqlite3-ruby 설치가 잘되었습니다.

관련 문제