# How do I configure ruby to mysql by default instead of sqlit

**URL:** <https://www.ruby-forum.com/t/how-do-i-configure-ruby-to-mysql-by-default-instead-of-sqlit/192625>\
**Category:** Ruby\
**Created:** [August 3, 2010, 9:02am UTC](https://www.ruby-forum.com/t/how-do-i-configure-ruby-to-mysql-by-default-instead-of-sqlit/192625 "2010-08-03T09:02:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![reivilo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/0ea827/32.png) [@reivilo](https://www.ruby-forum.com/u/reivilo)\
**Post date:** [August 3, 2010, 9:02am UTC](https://www.ruby-forum.com/t/how-do-i-configure-ruby-to-mysql-by-default-instead-of-sqlit/192625/1 "2010-08-03T09:02:23Z")

</div>

Hello,

I am running Mac OS X 10.6.4 and have installed the following:

ruby-1.9.1-p429  
RubyGems 1.3.7  
Rails 2.3.8

I am now getting an error because sqlite3 is not installed and I’ve read  
that there are issues installing ruby-sqlite3! SO I’m not sure if I  
should (or how to) install sqlite3.

A developer suggested I use sqlite3 for testing and mysql for  
production, but wouldn’t that mean having to convert my sqlite database  
to mysql for production? I might just as well always use mysql, no?

Which leads me to the following question: how do I configure rails to  
always default to using mysql database instead of sqlite3?

Thank you for your help.

Best regards,

Olivier

---

<div class="post-metadata">

**Author:** ![reivilo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/0ea827/32.png) [@reivilo](https://www.ruby-forum.com/u/reivilo)\
**Post date:** [August 3, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/how-do-i-configure-ruby-to-mysql-by-default-instead-of-sqlit/192625/2 "2010-08-03T14:20:42Z")

</div>

On Aug 3, 4:02 am, Olivier Db [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> should (or how to) install sqlite3.

Where are you reading that? installing sqlite3 is as simple as “gem  
install sqlite3-ruby”

Please report any issue to SQLite3-Ruby Issue tracker and group:

> **[Issues · sparklemotion/sqlite3-ruby](https://github.com/sparklemotion/sqlite3-ruby/issues)**
>
> Ruby bindings for the SQLite3 embedded database. Contribute to sparklemotion/sqlite3-ruby development by creating an account on GitHub.

[http://groups.google.com/group/sqlite3-ruby](http://groups.google.com/group/sqlite3-ruby)

> A developer suggested I use sqlite3 for testing and mysql for  
> production, but wouldn’t that mean having to convert my sqlite database  
> to mysql for production? I might just as well always use mysql, no?

If you use ActiveRecord and no SQL directly, no. The idea of using a  
ORM is to abstract you from the database engine running in the  
background.

> Which leads me to the following question: how do I configure rails to  
> always default to using mysql database instead of sqlite3?

config/database.yml

In the future, more questions Rails-specifics are better asked to a  
Rails group:

[http://groups.google.com/group/rubyonrails-talk](http://groups.google.com/group/rubyonrails-talk)

HTH,
