Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlite3-ruby install error on Ubuntu

You need the SQLite3 development headers for the gem’s native extension to compile against. You can install them by running (possibly with sudo):

apt-get install libsqlite3-dev

You just need a -- in there.

sudo gem install sqlite3-ruby -- --with-sqlite3-include=/usr/include

That specifies that the option is not to gem directly, but the specific gem.


In my case I have no basic compilers installed, so

sudo apt-get install build-essential

solved my problem, but for most the people I think https://stackoverflow.com/a/3649005/417267 is the solution.


This is what I did:

wget http://www.sqlite.org/sqlite-amalgamation-3.7.2.tar.gz
tar xzf sqlite-amalgamation-3.7.2.tar.gz
cd sqlite-3.7.2/

./configure
make
make install

gem install rails sqlite3-ruby

from : http://cuasan.wordpress.com/2010/10/13/rails-3-on-debian-with-sqlite-3/


If you run in ubuntu,and using RVM for ruby on rails,please add FIRST:

sudo apt-get install libxslt-dev libxml2-dev

OR You can check with these commands:

This command will prepare for you two packages : sqllite3 and libsqlite3-dev

sudo apt-get install sqlite3 libsqlite3-dev

-Now,install sqlite gem

 [sudo] gem install sqlite3-ruby

-using Ubuntu doesn't need sudo.

Goodluck! Note: i'm using Ubuntu 10.10 and it's working.


This was simply enough to make it work

sudo apt-get install libsqlite3-dev

Thanks to marshluca