2012-12-25 115 views
5

bundle install不工作,我得到這個錯誤:我不能安裝在sqlite3的寶石的Mac OSX 10.8.2

Installing sqlite3 (1.3.6) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

    /Users/Frank/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb --with-sqlite3-  include=/Users/Frank/include --with-sqlite3-lib=/Users/Frank/lib --with-sqlite3-dir=/Users/Frank/bin 
checking for sqlite3.h... yes 
checking for sqlite3_libversion_number() in -lsqlite3... yes 
checking for rb_proc_arity()... yes 
checking for sqlite3_initialize()... yes 
checking for sqlite3_backup_init()... yes 
checking for sqlite3_column_database_name()... no 
checking for sqlite3_enable_load_extension()... no 
checking for sqlite3_load_extension()... no 
checking for sqlite3_open_v2()... yes 
checking for sqlite3_prepare_v2()... yes 
checking for sqlite3_int64 in sqlite3.h... yes 
checking for sqlite3_uint64 in sqlite3.h... yes 
creating Makefile 

這一點我認爲它與libsql-dev的那不是工作要做。 後來我得到這個

make 
compiling backup.c 
In file included from ./sqlite3_ruby.h:51, 
      from backup.c:3: 
./backup.h:7: error: expected specifier-qualifier-list before ‘sqlite3_backup’ 
backup.c: In function ‘initialize’: 
backup.c:63: error: ‘sqlite3_backup’ undeclared (first use in this function) 
backup.c:63: error: (Each undeclared identifier is reported only once 
backup.c:63: error: for each function it appears in.) 
backup.c:63: error: ‘pBackup’ undeclared (first use in this function) 
backup.c:77: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c: In function ‘step’: 
backup.c:101: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c:102: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c: In function ‘finish’: 
backup.c:115: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c:116: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c:117: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c: In function ‘remaining’: 
backup.c:133: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c:134: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c: In function ‘pagecount’: 
backup.c:149: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
backup.c:150: error: ‘sqlite3BackupRuby’ has no member named ‘p’ 
make: *** [backup.o] Error 1 


Gem files will remain installed in /Users/Frank/gems/gems/sqlite3-1.3.6 for inspection. 
Results logged to /Users/Frank/gems/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out 

An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue. 
Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling. 

我開始今天得到它randmoly,沒有它我不能運行我的Rails應用。我能做什麼?

+3

請參閱https://github.com/luislavena/sqlite3-ruby/issues/20 – Himanshu

+0

謝謝!它解決了我的問題:) – frank

回答

1

最近有這個問題。必須打開XCode工具並接受服務條款。然後一切正常。 (確保你先安裝了XCode)