Database Reference
In-Depth Information
Connecting with Ruby
In order to use PostgreSQL as a database in Ruby applications, it is necessary to install
gem pg
in your
Gemfile
.
gem 'pg'
After that, run the
bundle install
command to download and install the necessary
dependencies.
For applications in Ruby on Rails, it is not necessary to configure the database connection.
When Heroku deploys your application, it automatically configures the
database.yml
file through the
DATABASE_URL
environment variable.