Gem install sqlite3-ruby

Hi --

I'm trying to set up Rails with sqlite on a raw Debian box. Rails is
fine, but I'm having problems with sqlite. Actually, sqlite is fine, but
the sqlite3-ruby bindings are problematic. I /suspect/ that this box
doesn't have some important development tools (I had to install gcc and
make manually), but I don't know what else I'm missing...

Here's the output I'm getting now:

$ sudo gem install sqlite3-ruby
Attempting local installation of 'sqlite3-ruby'
Local gem file not found: sqlite3-ruby*.gem
Attempting remote installation of 'sqlite3-ruby'
Select which gem to install for your platform (i486-linux)
1. sqlite3-ruby 1.1.0 (mswin32)
2. sqlite3-ruby 1.1.0 (ruby)
3. sqlite3-ruby 1.0.1 (ruby)
4. sqlite3-ruby 1.0.1 (mswin32)
5. sqlite3-ruby 1.0.0 (mswin32)
6. sqlite3-ruby 1.0.0 (ruby)
7. sqlite3-ruby 0.9.0 (ruby)
8. sqlite3-ruby 0.9.0 (mswin32)
9. sqlite3-ruby 0.6.0 (ruby)
10. sqlite3-ruby 0.5.0 (ruby)
11. Cancel installation

2

Building native extensions. This could take a while...
*** 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/bin/ruby1.8
        --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
ERROR: While executing gem ... (RuntimeError)
    ERROR: Failed to build gem native extension.
Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0 for inspection.
  ruby extconf.rb install sqlite3-ruby\nchecking for sqlite3.h... yes
checking for sqlite3_open() in -lsqlite3... no

Results logged to
/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/ext/sqlite3_api/gem_make.out
$

···

--
Posted via http://www.ruby-forum.com/\.

do you have swig installed? iirc the sqlite3-ruby bindings depend on it.

martin

···

On 7/12/06, Joshua Wehner <joshua.wehner@gmail.com> wrote:

Hi --

I'm trying to set up Rails with sqlite on a raw Debian box. Rails is
fine, but I'm having problems with sqlite. Actually, sqlite is fine, but
the sqlite3-ruby bindings are problematic. I /suspect/ that this box
doesn't have some important development tools (I had to install gcc and
make manually), but I don't know what else I'm missing...

Here are some very specific instructions which have proved handy in getting
through this:

http://code.whytheluckystiff.net/camping/wiki/BeAlertWhenOnSqlite3

_why

···

On Wed, Jul 12, 2006 at 12:24:39PM +0900, Joshua Wehner wrote:

I'm trying to set up Rails with sqlite on a raw Debian box. Rails is
fine, but I'm having problems with sqlite. Actually, sqlite is fine, but
the sqlite3-ruby bindings are problematic. I /suspect/ that this box
doesn't have some important development tools (I had to install gcc and
make manually), but I don't know what else I'm missing...

Martin DeMello wrote:

do you have swig installed? iirc the sqlite3-ruby bindings depend on it.

I do, actually.

$ sudo apt-get install swig
Reading Package Lists... Done
Building Dependency Tree... Done
swig is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 133 not upgraded.
$

···

--
Posted via http://www.ruby-forum.com/\.

why the lucky stiff wrote:

Here are some very specific instructions which have proved handy in
getting through this:

http://code.whytheluckystiff.net/camping/wiki/BeAlertWhenOnSqlite3

Installing 'build-essential' seems to have been the last hurdle. I'm up
and flying, now.

Thanks everyone for your help!

-- Joshua

···

--
Posted via http://www.ruby-forum.com/\.