-
-
Save anonymous/f7bd16fc717948cf0066c11673fbb161 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gateway = Net::SSH::Gateway.new(host, login, :password => '') | |
my_port = gateway.open('127.0.0.1', 5432, 5432) | |
connection = PG::Connection.open(:dbname => 'dbName', :user => 'user', :password => '', :port => my_port) | |
result = connection.query(query) | |
connection.close | |
gateway.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment