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 4272210
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:32:49+00:00 2026-05-21T07:32:49+00:00

I am currently making my way through the Ruby on Rails tutorial over at

  • 0

I am currently making my way through the Ruby on Rails tutorial over at http://ruby.railstutorial.org/ and I am trying to migrate the demo_app database to heroku.

heroku rake db:migrate
    rake aborted!
    unable to open database file

I have read on other stackoverflow posts that some people fixed this by entering

group :production, :staging do
  gem "pg"
end

group :development, :test do  
  gem "sqlite3-ruby", "~> 1.3.0", :require => "sqlite3"
end

in the gemfile. I also entered it into my gemfile and then deleted my old gemfile.lock and redid my bundle install AND rake db:migrate command. I am still receiving the same error.

I am obviously brand new to ruby, rails and heroku but I understand that the problem seems to be that I am using sqlite locally and postgresql in production (on heroku). Do I now have to install this postgresql onto my machine and then RE-migrate the DB? I am afraid I will not be able to get much more out of the tutorials (or ruby on rails itself) if I cannot use heroku.

  • 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-05-21T07:32:50+00:00Added an answer on May 21, 2026 at 7:32 am

    Kill it!

    I was having the same problem and found no solutions. I think something we are doing in those tutorials is leading us to mangle the database.yml file that heroku generates.

    I ended up destroying my heroku app

    heroku destroy
    

    and then creating a new one, pushing a fresh copy, and running

    heroku create
    git push heroku master
    heroku rakedb:migrate
    

    This time everything worked fine! Just make sure you have the pg gem in your gemfile for production

    group :production do
      gem "pg"
    end
    

    and add config/database.yml to your .gitignore file too for good measure.

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

Sidebar

Related Questions

I'm currently having difficulty finding a way of making my loops work. I have
Is there a way to aid gmail in making threads? We are currently using
I'm currently working my way through Andrew Appel's Modern Compiler Implementation in Java, and
I'm currently looking at hosting solutions for my Ruby on Rails SaaS web application,
I'm currently making an iphone web app based on Google App Engine (python). I
I'm currently making a front end to display license information for my companies software
I'm currently making a GWT project where I display some HTML in a RichTextArea
I'm currently making an iPhone app that has PDF viewing a crucial part of
I'm currently making some system that will gather statistical reports from different sites, for
I have a question about tables in MySQL. I'm currently making a website where

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.