472,133 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

Unable to Connect to Mysql from ruby

Hi Guys,
I have tried out several ways to connect to my MYSQL database thru Ruby on my windows machine.
I have used ruby-mysql, mysql-ruby, ruby DBI....but havent been lucky so far,
is there any installer kind of a thing to do this stuff!
""I get the following error - mswin32-ruby16.dll was not found""

Can anybody guide me in steps getting this working for me!!!
Let me know if you require any more information.


Thanks in Advance
Jan 25 '08 #1
6 5033
improvcornartist
303 Expert 100+
Are you using Rails, or only Ruby? Do you know if you have an ODBC installed for MySQL?
Jan 25 '08 #2
I am using just Ruby.
I have installed Mysql ODBC 3.51 Driver ,I can see that - Data Source(ODBC) under Administrative Tools in windows.

let me know if i need to test anything specifically for that.

Cheers
Jan 28 '08 #3
vinram
3
Hi Guys,
I have tried out several ways to connect to my MYSQL database thru Ruby on my windows machine.
I have used ruby-mysql, mysql-ruby, ruby DBI....but havent been lucky so far,
is there any installer kind of a thing to do this stuff!
""I get the following error - mswin32-ruby16.dll was not found""

Can anybody guide me in steps getting this working for me!!!
Let me know if you require any more information.


Thanks in Advance

hi,

just check after u install ruby and rails ...go to browser and type http://localhost:3000/ u will get a page with the below details appear when u click a link "about your application's environment" :

Ruby version 1.8.6 (i386-mswin32)
RubyGems version 0.9.4
Rails version 1.2.5
Active Record version 1.15.5
Action Pack version 1.13.5
Action Web Service version 1.2.5
Action Mailer version 1.3.5
Active Support version 1.4.4
Application root C:/rails/sample
Environment development
Database adapter mysql
Jan 28 '08 #4
improvcornartist
303 Expert 100+
You should be able to connect using something like the following.
Expand|Select|Wrap|Line Numbers
  1. require 'DBI'
  2. DBI.connect('DBI:ODBC:DSN', 'username', 'password')
  3. #Where DSN is your actual data source name.
This DBI page might have some helpful info.
Jan 28 '08 #5
hi,

just check after u install ruby and rails ...go to browser and type http://localhost:3000/ u will get a page with the below details appear when u click a link "about your application's environment" :

Ruby version 1.8.6 (i386-mswin32)
RubyGems version 0.9.4
Rails version 1.2.5
Active Record version 1.15.5
Action Pack version 1.13.5
Action Web Service version 1.2.5
Action Mailer version 1.3.5
Active Support version 1.4.4
Application root C:/rails/sample
Environment development
Database adapter mysql
HI Vinram,
I am not using Ruby on Rails!!!
Jan 29 '08 #6
Hi i am working frist time on ruby.

Anyone tell me how can we write query our page for inserting ,fetchimg record from database.i am using dtabase mysql.

and i have installed Instantrails on windows xp.
Mar 5 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Mondal | last post: by
3 posts views Thread by pc | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.