Error installing sqlite3 gem via bundler Error installing sqlite3 gem via bundler sqlite sqlite

Error installing sqlite3 gem via bundler


Here's the solution, which I've verified works.

.bash_profile setup:

# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$HOME/bin:$PATHGEM_HOME=$HOME/gemsGEM_PATH=$HOME/gemsexport LD_LIBRARY_PATH=$HOME/libexport USERNAME BASH_ENV PATH GEM_HOME GEM_PATH

Then run:

wget http://www.sqlite.org/sqlite-autoconf-3070701.tar.gztar -zxvf sqlite-autoconf-3070701.tar.gzcd sqlite-autoconf-3070701./configure --prefix=$HOMEmake && make installcd $RAILS_APP_DIRvi Gemfile

Make sure a line similar to this is in the Gemfile: gem 'sqlite3', "1.3.4"

bundle config build.sqlite3 --with-sqlite3-include=$HOME/include --with-sqlite3-lib=$HOME/lib --with-sqlite3-dir=$HOME/binbundle install --path vendor/bundle


On Ubuntu:

sudo apt-get install libsqlite3-dev

Then bundle install will work.


Install "sqlite-devel" package to build native extensions of "sqlite3" gem on RH-based systems.

On Debian-based systems install "libsqlite3-dev" package.