开发者

Connecting to a mysql db using RoR 3, sqlite3

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜