1 在gemfile中要添加

  gem 'mysql2'

 

2 在mysql数据库中创建三个数据库

  dept_dev

  dept_test

  dept_pro

3 配置文件

  

default: &default
adapter: mysql2
encoding: utf8
username: user1
password: 123
host: 127.0.0.1
port: 3306

development:
<<: *default
database: dept_dev


test:
<<: *default
database: dept_test

production:
<<: *default
database: dept_pro

相关文章:

  • 2021-04-06
  • 2021-07-11
  • 2021-07-01
  • 2021-11-06
  • 2022-12-23
  • 2021-10-17
  • 2021-12-30
猜你喜欢
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2021-05-17
  • 2022-12-23
相关资源
相似解决方案