Creating blog with Ruby and Rails- Postgresql setup part2 (b)

gem ‘pg’, group: :production
sudo apt-get install wget ca-certificateswget --quiet -O - | sudo apt-key add -
sudo sh -c 'echo "deb `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

Step 2: Update the Package List

After adding the official PostgreSQL repository, make sure to update the package list. Doing this ensures you install the latest PostgreSQL package.

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
apt show postgresql
sudo apt install postgresql postgresql-contrib
sudo su - postgres

Check Connection Information

If you are connected to PostgreSQL and want to see details of the connection, use the command:

sudo apt-get install postgresql 
sudo apt-get install libpq-dev
gem install pg



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Khemlall Mangal

Khemlall Mangal

I am a passionate coder, QA Engineer, and someone who enjoys the outdoors.