sqlite3-ruby install error on Ubuntu

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.


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

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/