So Murakami - BlogHow to use Postgresql in Ruby on Rails on Cloud9

Updated: February 18, 2024

Published: February 16, 2024

Title Image

Requirements

  • Cloud9
  • Ruby on Rails installed and running

Start Postgresql Server

sudo service postgresql start

Make a rails app

Now, let's make a rails app

rails new appname -d=postgresql

As you can see, with the -d option we can specify which database server we use.

Run bundle commands

bundle exec rails db:migrate:reset
bundle exec rails db:seed

Run rails db commands

rails db:create
rails db:migrate

Congrats! You are all set up.

Summary

In this article, I explained how to set up PostgreSQL and use it with Ruby and Rails on Cloud9.

Now you can read this article to deploy Ruby on Rails app on Render.com

@2025