开发者

Connecting to a mysql db using RoR 3, sqlite3

开发者 https://www.devze.com 2023-02-13 04:02 出处:网络
Surely this is a newb question as I am just l开发者_高级运维earning RoR and can\'t find a simple answer to this relatively simple need.

Surely this is a newb question as I am just l开发者_高级运维earning RoR and can't find a simple answer to this relatively simple need.

I want to use sqlite3 as my app's database, but I would like to connect to another mysql database just to return data.

I've tried to install the gem for mysql, but won't install for whatever reason. I tried to use MAMP mysql lib but it rejected that as well.

Using: - rails 3 - ruby 1.9 - mac os x snow leopard

Any help in this matter is greatly appreciated!


Check out the gem mysql2; in their readme, the section entitled "Usage" may be really helpful for you.

0

精彩评论

暂无评论...
验证码 换一张
取 消