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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:46:14+00:00 2026-05-17T16:46:14+00:00

Our team uses different databases for each other, and we are using bundler so

  • 0

Our team uses different databases for each other, and we are using bundler so our Gemfile contains the repo creator’s db connector(mysql)

I am using pg and due to a bit laziness and fear of breaking something, I don’t want to use mysql, so I just add a gem “pg” in our Gemfile.

Of course, since we’re using git, it will always show as a modified file, and we all use the Gemfile so we can’t gitignore it or commit it with our changes.

Question is, how do we go about this? Is there a conditional in bundler or do I just have to declare that I’m using a certain gem someplace else?

  • 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-17T16:46:15+00:00Added an answer on May 17, 2026 at 4:46 pm

    Since Gemfile, like Rakefile, is just a chunk of Ruby, you can throw in conditionals if you think it will simplify your life. For instance:

    if (Gem.available?('pg'))
      gem 'pg'
    else
      gem 'mysql2'
    end
    

    Sometimes you have to do this for different Ruby versions as 1.8 and 1.9 sometimes need different gems.

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

Sidebar

Related Questions

We are using SLF4J+Logback combination at our project for a while now and are
My development team are having a problem having snippets of text shown for search
In our project we have to commit all changes to the clients svn repository.
The situation is as follow : Our company works two main production sites, communicating
I'm trying to determine the best way to organize our Maven / Spring web
Does anyone know how a java.util.Date gets serialized? I mean explain to me exactly
Does anyone know how a java.util.Date gets serialized? I mean explain to me exactly
I'm trying to use the Eclipse Java Code formatter. Eclipse 3.5 on Red Hat
Important Update: See update 5 at the bottom there is no performance issue in

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.