Hi guys,
I’ve mais rails code on one machine and the database in the other,
sometime ago the connection between the both was straightforward, for
example:
ActiveRecord::Base.establish_connection(
:adapter=>“mysql”,
:host=>“ip.to.other.host”,
:database=>“databasename”,
:username=>“something”,
:password=>"*******"
)
But now I’ve a proxy between the two machines, so to access the database
machine i’ve to tell ActiveRecord to use the proxy, how to I tell this
to activerecord ?
(i know, for example, to use a proxy with net/http I only 've to do
require ‘net/http’)
proxy_addr = 'your.proxy.host'
proxy_port = 8080
:
Net::HTTP::Proxy(proxy_addr, proxy_port).start('www.example.com')
{|http|
# always connect to your.proxy.addr:8080
:
}
Tks in advance,
Ze Maria