Skip to content

Commit

Permalink
Riddle update.
Browse files Browse the repository at this point in the history
  • Loading branch information
pat committed May 25, 2011
1 parent 6e17734 commit 102d7fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vendor/riddle/lib/riddle/query.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module Riddle::Query
def self.connection(address = 'localhost', port = 9312)
def self.connection(address = '127.0.0.1', port = 9312)
require 'mysql2'

# If you use localhost, MySQL insists on a socket connection, but Sphinx
# requires a TCP connection. Using 127.0.0.1 fixes that.
address = '127.0.0.1' if address == 'localhost'

Mysql2::Client.new(
:host => address,
:port => port
Expand Down

0 comments on commit 102d7fb

Please sign in to comment.