Can i use MAMP (MySQL) or XAMPP (MySQL) with Ruby

2019-03-20 19:52发布

Can i use MAMP (MySQL) or XAMPP (MySQL) with Ruby on Rails 3? i installed MySQL from MYSQL.com and had so much trouble that i like to use the MAMP/XAMPP Mysql. Is Anyone doing this? Also what configurations do i need to make to do this. I'm new to RoR.

Thank you in advance ;-)

1条回答
甜甜的少女心
2楼-- · 2019-03-20 20:37

Yes, I use it, this is my config in database.yml

development:
  adapter: mysql2
  database: app
  username: app_user
  password: app_password
  socket: /Applications/MAMP/tmp/mysql/mysql.sock
  host: localhost
  pool: 5
  timeout: 5000
  encoding: utf8

I'm not sure if it's the only thing to changed, you maybe must to copy MySQL header files from the source of MySQL and put it in the MAMP directory

查看更多
登录 后发表回答