How do I set MySQL as the default database in Rails 3?

后端 未结 4 1421
無奈伤痛
無奈伤痛 2021-02-04 08:34

I started using Rails 2 last April but stopped this June because I thought learning it when Rails 3 was released would be more practical since a lot of it was completely refacto

4条回答
  •  面向向阳花
    2021-02-04 09:01

    Since Rails 3.2 you can define a .railsrc file with custom command line options that will always apply to rails new

    So, if you create a file called .railsrc and put it in your home directory w/ the contents like this -d mysql it wll make mysql be your default database. You can put any of the command line options in there (including application templates which are supper awesome!)

    Run rails new --help from the command line to see all your options.

提交回复
热议问题