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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:56:02+00:00 2026-06-01T05:56:02+00:00

I am working on a localhost app which is backed by a MySQL database.

  • 0

I am working on a localhost app which is backed by a MySQL database. However I would like to deploy to Heroku which I have read is bacekd by PostGreSQL.

What is the best way of doing so? I have thought of doing this in the Gemfile:

group :development do
 gem 'mysql2'
end

group :test do
 gem 'pg'
end

But, how would I configure the database.yml?
Is this the correct approach?

  • 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-01T05:56:04+00:00Added an answer on June 1, 2026 at 5:56 am

    This page has an example configuration:

    Tutorial: Rails 3.2 with Ruby 1.9.3 on Heroku · RailsApps

    That tutorial assumes you have SQLite locally. If you want MySQL, just use in your Gemfile

    group :development, :test do
      gem 'mysql2'
    end
    group :production do
      gem 'pg'
    end
    

    But, how would I configure the database.yml

    You do not have to do any special setup; Heroku will generate it for you once you push.

    Note (from Heroku):

    We highly recommend using PostgreSQL during development. Maintaining parity between your development and deployment environments prevents subtle bugs from being introduced because of differences between your environments.

    Local gems note (from the tutorial):

    Run bundle install --without production to update your gems. The flag --without production allows you to skip local installation of the pg gem; otherwise, you will have to install PostgreSQL locally (the pg gem won’t install if PostgreSQL is not installed).

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

Sidebar

Related Questions

I have an app config file which declares globals using DEFINE: define('BASE_DOMAIN', 'localhost/...'); define('BASE_URL',
I have a little application which is working fine when testing is on localhost.
I am working on my app (Rails 3.2, PostgreSQL 9.1) on localhost and everything
As we are working locally so our service link is: http://localhost:8012/webservice.asmx When we deploy
i have a dynamic php web page localhost/ctd/index.php All working good except if i
I am working on an iPad app which has an embedded HTTP server listening
I'm working on a OS X app which needs Redis support. I've already tried
i have an RoR application Log, which similar to the book store app, my
I'm working on a PHP-based webapp that has an existing MySQL database where all
I have been working on an MVC 3 app. I was using VS 2010's

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.