1

I'm working through the setup process described in Agile Web Development with Ruby, and I'm having difficulty installing the sqlite3 gem. I have Ruby version 1.9.2 and gem version 1.7.2 installed on os x 10.5.8, and when I run

sudo gem install sqlite3

I get this error message. Any suggestions? I appreciate the help in advance.

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

        /usr/local/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
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=/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-sqlite3lib
    --without-sqlite3lib


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out
Matt Stone
  • 185
  • 1
  • 1
  • 8
  • possible duplicate of [sqlite3 gem fails to install](http://stackoverflow.com/questions/5025680/sqlite3-gem-fails-to-install) – fl00r Apr 07 '11 at 20:18

1 Answers1

0

There are a lot of answers for your issue. Main idea is to install Xcode

...

Community
  • 1
  • 1
fl00r
  • 82,987
  • 33
  • 217
  • 237