# Gem install sqlite3-ruby

**URL:** <https://www.ruby-forum.com/t/gem-install-sqlite3-ruby/98043>\
**Category:** Ruby\
**Created:** [July 12, 2006, 5:24am UTC](https://www.ruby-forum.com/t/gem-install-sqlite3-ruby/98043 "2006-07-12T05:24:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaw6](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dec6dc/32.png) [@jaw6](https://www.ruby-forum.com/u/jaw6)\
**Post date:** [July 12, 2006, 5:24am UTC](https://www.ruby-forum.com/t/gem-install-sqlite3-ruby/98043/1 "2006-07-12T05:24:27Z")

</div>

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  
$

---

<div class="post-metadata">

**Author:** ![jaw6](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dec6dc/32.png) [@jaw6](https://www.ruby-forum.com/u/jaw6)\
**Post date:** [July 12, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/gem-install-sqlite3-ruby/98043/2 "2006-07-12T17:06:00Z")

</div>

On 7/12/06, Joshua W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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…

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

martin

---

<div class="post-metadata">

**Author:** ![jaw6](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dec6dc/32.png) [@jaw6](https://www.ruby-forum.com/u/jaw6)\
**Post date:** [July 12, 2006, 5:22pm UTC](https://www.ruby-forum.com/t/gem-install-sqlite3-ruby/98043/3 "2006-07-12T17:22:00Z")

</div>

On Wed, Jul 12, 2006 at 12:24:39PM +0900, Joshua W. 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…

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

[http://code.whytheluckystiff.net/camping/wiki/BeAlertWhenOnSqlite3](http://code.whytheluckystiff.net/camping/wiki/BeAlertWhenOnSqlite3)

\_why

---

<div class="post-metadata">

**Author:** ![jaw6](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dec6dc/32.png) [@jaw6](https://www.ruby-forum.com/u/jaw6)\
**Post date:** [July 12, 2006, 5:47pm UTC](https://www.ruby-forum.com/t/gem-install-sqlite3-ruby/98043/4 "2006-07-12T17:47:04Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![jaw6](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dec6dc/32.png) [@jaw6](https://www.ruby-forum.com/u/jaw6)\
**Post date:** [July 12, 2006, 5:22pm UTC](https://www.ruby-forum.com/t/gem-install-sqlite3-ruby/98043/5 "2006-07-12T17:22:32Z")

</div>

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.  
$
