Menu

Thursday, December 16, 2010

The command used to create RoR project with Mysql

I have many versions of Rails in my computer and I want to create a RoR Project bases on Rails 3.0.3, so I must use the following commands to generate my project.
rails _3.0.3_ new rails303 --database=mysql

YOUR_PATH\rails303>bundle install


After you config username and password (that'll be used to connect to mysql database adapter) in database.yml file (YOUR_PROJECT_PATH/config/database.yml)

Type "rake db:create" in the terminal to create the database (its name is the same as you config in database.yml)

No comments:

Post a Comment