Hi I want to establish connection with mysql manually in rails so i use DBI.connect("DBI:Mysql:video_devlopment:localhost", "username", "userpaass") but it give me errors how i make this . can one sort this . Thanks
I found the solutions First we have to installed ruby dbi-0.2.0 pack for the mysql Then this work .
I assume you're just doing this with pure Ruby but if you're doing this in Rails, there's a better way:
You don't need DBI to connect to MySQL without ActiveRecord, you can just use the "MySQL/Ruby":http://rubyforge.org/projects/mysql-ruby/ driver Rails uses, avoiding the need to add another dependency to your software.