How To Connect To MySQL Database With Ruby(No Rails)


#1

Hello All,

Cloud9 is great, but I am struggling with something. I am writing a ruby script, and I would like to connect to MySQL. I am including the MySQL gem “mysql”, and ruby is not finding it. Do I have to install it, also, what version of MySQL is installed? 1 or 2? I am not using Rails.

Also, can someone show some example connect code, because I can not find anything online.

Thank you,

PiL