tags:

views:

415

answers:

1

I've xcode 3.0 installed. And I need to install sqlite3-ruby gem (for rhosync).

When I run:

sudo gem install -l sqlite3-ruby

I get following error:

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

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for #include <sqlite3.h>
... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for sqlite3_initialize()... no
sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade!
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/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-sqlite3lib
 --without-sqlite3lib


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out

I've checked many links (on Stack Overflow and other sites) but nothing seems to work.

Some people suggest that install Ruby Headers from Mac OS X Disk 2. But I don't have that disc. I've instead installed XCode 3.0 SDK.

What should I do?

+1  A: 

I installed MacPorts from http://macports.org and then ran

sudo port install sqlite3

after that sqlite3-ruby installed successfully.

Abhijeet Pathak