Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi guys im new in Digital Ocean and im trying to deploy a personal project. My issue happens when i try to migrate into a production database in a droplet rails app
This is my database.YML
default: &default
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch(“RAILS_MAX_THREADS”) { 5 } %>
production:
<<: *default
secret_key_base: <%= ENV[“SECRET_KEY”] %>
username: <%= ENV[“DATABASE_USER”] %>
password: <%= ENV[“DATABASE_PASSWORD”] %>
database: <%= ENV[“DATABASE”] %>
host: <%= ENV[“DATABASE_HOST”] %>
these are the steps im following
- Cd Into rails app on VM
- rails s -d -b 0.0.0.0 RAILS_ENV=production
At this point the production server is “online”
then i want to get migrations by running this:
- rake db:migrate RAILS_ENV=production
and this is the issue:
Caused by:PG::ConnectionBad: FATAL: database “root” does not exist
Rails -v 6.0.3.4
Ruby -v 2.7.1
Aakash Singh
Aakash Singh
Frank Tufano
fullammo
4ae272398ee6445a9bf73f4cd632b5
eddie
Taha Aziz Ben Ali
Telmo Valverde
Alexandre Herlinvaux
52d4eff26a544eefb189e2005836b2