localhost:3000数据库适配器

时间:2016-01-03 23:46:37

标签: mysql ruby-on-rails ruby

如果我的localhost:3000页面显示"数据库适配器postgresql",这是否意味着postgresql正在运行而不是mysql

背景:我最初安装了postgresql,后来安装了mysql。

我的database.yml文件目前包含以下内容,因此我不确定我在哪里出错。

development:
  adapter: mysql2
  host: localhost
  database: projects
  username: root
  password: 
  pool: 5
timeout: 5000

1 个答案:

答案 0 :(得分:0)

1:在您的gemfile中添加gem 'mysql2'

2:运行bundle install

3: mysql -u root#for do login并创建db

4: mysql> create Database projects;

希望这能帮到你!!!

相关问题