我可以在 Ruby on Rails 3 中使用 MAMP (MySQL) 或 XAMPP (MySQL) 吗?

2022-01-14 00:00:00 xampp ruby mysql mamp ruby-on-rails-3

我可以在 Ruby on Rails 3 中使用 MAMP (MySQL) 或 XAMPP (MySQL) 吗?我从 MYSQL.com 安装了 MySQL,遇到了很多麻烦,我喜欢使用 MAMP/XAMPP Mysql.有人这样做吗?我还需要做什么配置才能做到这一点.我是 RoR 的新手.

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.

提前谢谢你;-)

推荐答案

是的,我用它,这是我在database.yml中的配置

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

我不确定是不是唯一要更改的,你可能必须从 MySQL 源中复制 MySQL 头文件并将其放在 MAMP 目录中

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

相关文章