问题描述
我可以在 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
这篇关于我可以在 Ruby on Rails 3 中使用 MAMP (MySQL) 或 XAMPP (MySQL) 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!