# Installing sqlite3-ruby with rubygems on Ubuntu 8.0.4.1

**URL:** <https://www.ruby-forum.com/t/installing-sqlite3-ruby-with-rubygems-on-ubuntu-8-0-4-1/152855>\
**Category:** Rails\
**Created:** [November 8, 2008, 10:28am UTC](https://www.ruby-forum.com/t/installing-sqlite3-ruby-with-rubygems-on-ubuntu-8-0-4-1/152855 "2008-11-08T10:28:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigchoco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@bigchoco](https://www.ruby-forum.com/u/bigchoco)\
**Post date:** [November 8, 2008, 10:28am UTC](https://www.ruby-forum.com/t/installing-sqlite3-ruby-with-rubygems-on-ubuntu-8-0-4-1/152855/1 "2008-11-08T10:28:13Z")

</div>

Hi everyone,

I’m on Ubuntu Hardy and I just installed

ruby1.8  
irb1.8  
ri1.8  
rdoc1.8  
rubygems  
ruby1.8-dev

I then intalled rails with rubygems and had to run the gem update  
–system command once I wanted to create my first rails project,

I also have to install the sqlite3-ruby gem but each time I try to  
here’s the error I get :

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

/usr/bin/ruby1.8 extconf.rb install sqlite3-ruby  
checking for fdatasync() in -lrt… yes  
checking for sqlite3.h… no

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

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

So I’m probably missing some libraries or maybe a environment variable,  
could you please help me sort this out, I’d be enlightned

Cheers 🙂

bigchoco

---

<div class="post-metadata">

**Author:** ![bigchoco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@bigchoco](https://www.ruby-forum.com/u/bigchoco)\
**Post date:** [November 8, 2008, 10:32am UTC](https://www.ruby-forum.com/t/installing-sqlite3-ruby-with-rubygems-on-ubuntu-8-0-4-1/152855/2 "2008-11-08T10:32:28Z")

</div>

Ok solved my problem by installing the sqlite3-dev packages sorry for  
being impatient

Happy coding 😛

---

<div class="post-metadata">

**Author:** ![bigchoco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@bigchoco](https://www.ruby-forum.com/u/bigchoco)\
**Post date:** [March 3, 2009, 3:19am UTC](https://www.ruby-forum.com/t/installing-sqlite3-ruby-with-rubygems-on-ubuntu-8-0-4-1/152855/3 "2009-03-03T03:19:12Z")

</div>

Agree! 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

big choco wrote:

> Ok solved my problem by installing the sqlite3-dev packages sorry for  
> being impatient
> 
> Happy coding 😛
