开发者

What is mysql2?

$rails new twitter -d mysql

then the

database.yml

lo开发者_StackOverflowoks like

development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: twitter_development
  pool: 5
  username: root
  password: root
  host: localhost

So, i am sonfused why adapter is mysql2? not mysql? is this gonna be a problem? I need to change it back to mysql or leave it here? Thanks.


mysql2 is the modern successor of the mysql gem. Don't worry, this will work fine for all current MySQL versions.

More here: Ruby, Rails: mysql2 gem, does somebody use this gem? Is it stable?


The adapter is mysql2 as that is the gem you will be using to connect. There are two gems, mysql and mysql2. The correct gem to use for Rails 3 is mysql2.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜