How to use MySQL instead of sqlite3

R

Rimantas Liubertas

How can I set Ruby on Rails to use MySQL? I tried
gem install mysql

but new projects still default to using sqlite3.

For existing projects you should chage database.yml, for new projects
you can use rails -d mysql project_name

Regards,
Rimantas
 
P

Phillip Gawlowski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alex Chun wrote:
| The current release of Ruby on Rails uses sqlite3 as its default database.
|
| http://weblog.infoworld.com/tcdaily/archives/2008/01/ruby_on_rails_g.html
|
| How can I set Ruby on Rails to use MySQL? I tried
|
| gem install mysql
|
| but new projects still default to using sqlite3.

1) Rails questions are better asked the Rails community:
rubyonrails.com/community

2) rails -d mysql, IIRC.


- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

~ - You know you've been hacking too long when...
...your speech is punctuated by finger twitches (or arm-waving) indicating
braces.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgtxnIACgkQbtAgaoJTgL+xAwCfaxFbIEM1Kv+exDe1dpAwZsy8
kRkAoJfFB01AmVgVaOE0tJs4+1Ld8quj
=I/o5
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top