【Rails】Rails使用mysql连接数据库出错


错误如下:

 no implicit conversion of Fixnum into String (TypeError)

错误出在这里:

production:
  adapter: mysql2
  encoding: utf8
  database: iboyue
  username: root
  password: 123
  pool: 5
  host: 127.0.0.1
  port: 3306

密码类型应该是字符串,但是这里密码是123,系统把它当作数字来处理,出现了错误,加上引号即可。


  password: '123'


你可能感兴趣的:(mysql)