Rails: Getting MySQL, PostgreSQL or SQLite installed on Ubuntu

I don’t how many times I had to google this so here it for posterity:

Install the sqlite3 connector:
sudo apt-get install libsqlite3-dev
sudo gem install sqlite3-ruby

Or install the MySQL database and it’s connector:
sudo apt-get install mysql-server mysql-client
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo gem install mysql

install the PostgreSQL database and it’s connector:
sudo apt-get install postgresql-server postgresql-client
sudo apt-get install libpq-dev
sudo gem install pg