Read more

Mysql/Mysql2 agnostic database.yml

Tobias Kraze
June 15, 2012Software engineer at makandra GmbH

If you upgrade to the mysql2 gem, you will run into the problem that the server's database.yml (which is usually not under version control) needs to change exactly on deploy.

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

You can however make your database.yml work for mysql and mysql2 at the same time. Simpy do this

production:
   adapter: <%= defined?(Mysql2) ? 'mysql2' : 'mysql' %>
   #...
Posted by Tobias Kraze to makandra dev (2012-06-15 16:31)