[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to use MySQL instead of sqlite3

Alex Chun

5/16/2008 5:29:00 PM

The current release of Ruby on Rails uses sqlite3 as its default database.

http://weblog.infoworld.com/tcdaily/archives/2008/01/ruby_on_ra...

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

gem install mysql

but new projects still default to using sqlite3.

Thanks.

Alex




2 Answers

Rimantas Liubertas

5/16/2008 5:36:00 PM

0

> 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
--
http://rim...

Phillip Gawlowski

5/16/2008 5:38:00 PM

0

-----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_ra...
|
| 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.bl...

~ - 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....

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