Ruby/MySQL bug (0.1.4 version)

S

sdmitry

Sorry for my previous message, it you saw it, it
must be empty.
Well, I was trying to run Ruby/MySQL under windows.
and found this problem - method real_connect thinks
that every localhost must have UNIX sockets, what of
course make s windows unhappy and Ruby/MySQL not working.

There is one line patch for that, I don't know how
good it is, ubt it worked for me:
def real_connect(host=nil, user=nil, passwd=nil, db=nil, port=nil,
socket=nil, flag=nil)
- if host == nil or host == "localhost" then
+ if (!PLATFORM =~ /mswin32/) and host == nil \
|| host == "localhost" then
unix_socket = socket || ENV["MYSQL_UNIX_PORT"] || MYSQL_UNIX_ADDR

P.S. Sorry if text is messed, I'm writing this from a dumb terminal..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top