Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8436699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:15:09+00:00 2026-06-10T07:15:09+00:00

I was making a web app to deploy using Heroku.com when I realized that

  • 0

I was making a web app to deploy using Heroku.com when I realized that the only database type they support is PostgreSQL. Up until now, my app (powered by the Ruby gem Sinatra) accessed the database via the .Sqlite method for the Sequel gem.

Here’s my Ruby script from when I used Sequel to access the .db file via SQLite:

DB = Sequel.sqlite('mydatabase.db')
DB.create_table :mytable do
  primary_key :id
  String :column_name
end

I installed PostgreSQL after learning Heroku used only that. Here’s the script via postgres (my username is literally ‘postgress’, though I obviously won’t reveal my password in this question):

DB = Sequel.postgres('mydatabase.db',:user=>'postgres',:password=>'my_password_here',:host=>'localhost',:port=>5432,:max_connections=>10)
DB.create_table :mytable do
  primary_key :id
  String :column_name 
end

However, when I run this code, I get the following error:

C:/Ruby193/lib/ruby/gems/1.9.1/gems/sequel-3.38.0/lib/sequel/adapters/postgres.rb:208:in 'initialize': PG::Error: FATAL: database "mydatabase.db" does not exist (Sequel::DatabaseConnectionError)

I’ve tried searching Google, StackOverflow, Sequel documents, and the Heroku help documents for any help, but I’ve found no fix to this problem.

Does anyone know what I am doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:15:11+00:00Added an answer on June 10, 2026 at 7:15 am

    The database mydatabase.db doesn’t exist, as per the error message from Pg. Likely reasons:

    • You probably meant mydatabase without the SQLite-specific .db filename suffix
    • It’s possible you created the db with different case, eg "Mydatabase.db";
    • You might be connecting to a different Pg server than you think you are
    • You never created the database. Unlke SQLite’s default behaviour, Pg doesn’t create databases when you try to connect to a database that doesn’t exist yet.

    If in doubt, connect to Pg with psql and run \l to list databases, or connect via PgAdmin-III.

    The PostgreSQL documentation and tutorial are highly recommended, too. They’re well written and will teach you a lot about SQL in general as well as Pg in particular.

    BTW, the postgres user is a superuser. You should not be using it for your application; it’s like running your server as root, ie a really bad idea. Create a new PostgreSQL user without superuser, createdb or createuser rights and use that for your application. You can either CREATE DATABASE somedb WITH OWNER myappuser – or preferably, create the database owned by a different user to your webapp user and then expicitly GRANT the webapp user the minimum required permissions. See user management and GRANT.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app I'm making to run off a CMS that is
We recently built a web app using Prototype, making a fair amount of use
I am making a web app that will process large files (1gb+). While the
I'm making a new web app using Rails, and was wondering, what's the difference
While analyzing some approaches to making our web app easier to deploy on our
Hi I'm making a web app using mongoDB for the persistence later, I was
I am making a Web app that will be available in free and paid
I'm making a web app that uses geolocation, and I'm whipping up a nearby
Ok so I'm making a simple web app using the technologies from the topic,
I'm currently making a note web app that going pretty well. I have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.