How to create a rails 3.1 application using mysql

How to create a rails 3.1 application using mysql. The following command is used to create a project with sqlite database.

rails new depot 

I would like to use mysql and then sqlite. So can someone tell me how to create a project using mysql.

thanks

+7
source share
2 answers

See the help for the new rails command

 rails new --help 

-d, [--database = DATABASE]

Presetting for the selected database (options: mysql / oracle / postgresql / sqlite3 / frontbase / ibm_db) # Default: sqlite3

+12
source

You should use:

 rails new depot -d mysql 
+11
source

All Articles