# Sqlite3-ruby gem installation is driving me crazy

**URL:** <https://www.ruby-forum.com/t/sqlite3-ruby-gem-installation-is-driving-me-crazy/137620>\
**Category:** Rails\
**Created:** [May 14, 2008, 6:38pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby-gem-installation-is-driving-me-crazy/137620 "2008-05-14T18:38:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pReload](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@pReload](https://www.ruby-forum.com/u/pReload)\
**Post date:** [May 14, 2008, 6:38pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby-gem-installation-is-driving-me-crazy/137620/1 "2008-05-14T18:38:01Z")

</div>

I installed Rails 1.8.6 on a Panther system. Everything is ok but I  
can’t install sqlite3-ruby gem. This is the terminal result:

* * *

$ sudo gem install --local sqlite3-ruby-1.2.1.gem  
Building native extensions. This could take a while…  
ERROR: Error installing sqlite3-ruby-1.2.1.gem:  
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install --local sqlite3-ruby-1.2.1.gem  
checking for sqlite3.h… yes  
checking for sqlite3\_open() in -lsqlite3… no

make  
make: \*\*\* No rule to make target `ruby.h', needed by`sqlite3\_api\_wrap.o’. Stop.

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/  
sqlite3-ruby-1.2.1 for inspection.  
Results logged to /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/  
ext/sqlite3\_api/gem\_make.out

* * *

I try to solve the problem today looking for something similar in  
newsgroups but I did’t find anything useful. Any suggestions?

G.

---

<div class="post-metadata">

**Author:** ![pReload](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@pReload](https://www.ruby-forum.com/u/pReload)\
**Post date:** [May 14, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby-gem-installation-is-driving-me-crazy/137620/2 "2008-05-14T18:56:17Z")

</div>

On 14 Mag, 18:23, pReload [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I installed Rails 1.8.6 on a Panther system. Everything is ok but I  
> can’t install sqlite3-ruby gem. This is the terminal result:

I solved the problem using this command line:  
sudo gem install sqlite3-ruby – --with-sqlite3-include=/opt/local/  
include --with-sqlite3-lib=/opt/local/lib  
the problem was that the sqlite3 was not installed in the default  
locations.

Thanks again,  
G.

---

<div class="post-metadata">

**Author:** ![pReload](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@pReload](https://www.ruby-forum.com/u/pReload)\
**Post date:** [March 3, 2009, 3:19am UTC](https://www.ruby-forum.com/t/sqlite3-ruby-gem-installation-is-driving-me-crazy/137620/3 "2009-03-03T03:19:37Z")

</div>

I see the problem with install gem sqlite3-ruby. This way help me to fix  
it! Just install developer headers for provide compile the library from  
sources.  
SQLite3:

Without the -d option, rails will default to sqlite. To install SQLite3:

~$ sudo apt-get install libsqlite3-0 libsqlite3-dev  
~$ sudo gem install sqlite3-ruby

pReload wrote:

> On 14 Mag, 18:23, pReload [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I installed Rails 1.8.6 on a Panther system. Everything is ok but I  
> > can’t install sqlite3-ruby gem. This is the terminal result:
> 
> I solved the problem using this command line:  
> sudo gem install sqlite3-ruby – --with-sqlite3-include=/opt/local/  
> include --with-sqlite3-lib=/opt/local/lib  
> the problem was that the sqlite3 was not installed in the default  
> locations.
> 
> Thanks again,  
> G.
