How do I install SQlite3 for Ruby on Rails while using RVM How do I install SQlite3 for Ruby on Rails while using RVM sqlite sqlite

How do I install SQlite3 for Ruby on Rails while using RVM


You are missing shared libraries to install sqlite3.

Probably one thing that most ROR install instructions or tutorials don't tell you is that when running on Linux you need shared libraries or if your a windows person dll's are missing or incompatible with the version you are trying to run.

I see you are running RVM also. So you should try this.

sudo apt-get install libsqlite3-devsudo gem install sqlite3-ruby

If you still have trouble installing the gem try this - drop the sudo in the line and just gem install

gem install sqlite3-ruby -- --with-sqlite3-dir=/usr/local/lib

Additionally it doesn't hurt to update all your libraries for Ubuntu.

Run this first before running the libraries for sqlite3:

sudo apt-get updatesudo apt-get upgrade

It will probably take some minutes to run the update and upgrade. You can also run this from the Admin --> System area . There is a menu that allows you to run all library updates and checks for dependencies which may be missing.

You could also run the sqlite install from the system applications GUI, as it will check dependency programs which may also be needed.

Just remember when something doesn't install like the issue you are having with Ruby on Rails, it usually means that libraries are missing or the incorrect version needed.


Here's a better answer from HEROKU - cannot run git push heroku master

Since you can't use sqlite3 on heroku add this to your Gemfile:

group :production do  gem 'pg'endgroup :development, :test do  gem 'sqlite3'end