Create a new Ruby on Rails application using MySQL instead of SQLite

前端 未结 19 1189
难免孤独
难免孤独 2020-12-04 05:46

I want to create my Rails application with MySQL, because I like it so much. How can I do that in the latest version of Rails instead of the default SQLite?

相关标签:
19条回答
  • 2020-12-04 06:32

    If you are creating a new rails application you can set the database using the -d switch like this:

    rails -d mysql myapp
    

    Its always easy to switch your database later though, and using sqlite really is easier if you are developing on a Mac.

    0 讨论(0)
提交回复
热议问题