Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i create the rails 3.1 application using mysql

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

rails new depot

I'd like to use mysql then sqlite. So can anyone tell me how to create a project with mysql.

Thanks

like image 741
demonchand Avatar asked May 17 '11 10:05

demonchand


2 Answers

See help for rails new command

rails new --help

-d, [--database=DATABASE]

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

like image 57
Anton Avatar answered Sep 18 '22 13:09

Anton


You should use:

rails new depot -d mysql
like image 35
Sergey Kishenin Avatar answered Sep 20 '22 13:09

Sergey Kishenin