AWS remote connection using 'pg' gem

45 views
Skip to first unread message

Henry

unread,
Oct 30, 2013, 1:20:39 AM10/30/13
to rub...@googlegroups.com
I'm trying to connect to postgres running on a AWS from a rails app. Can anyone point me in the direction to achieve this?

Henry

unread,
Oct 30, 2013, 1:53:25 AM10/30/13
to rub...@googlegroups.com
just tried

conn = PGconn.connect( 'ec2-xx-xx-xx-xx.compute-xx.amazonaws.com', 5432, "", "", "dbname", "ubuntu", "" )

Michael Granger

unread,
Oct 30, 2013, 1:43:13 PM10/30/13
to rub...@googlegroups.com
On Tuesday, October 29, 2013 10:53:25 PM UTC-7, Henry wrote:
just tried

conn = PGconn.connect( 'ec2-xx-xx-xx-xx.compute-xx.amazonaws.com', 5432, "", "", "dbname", "ubuntu", "" )



...and what happened vs. what you expected to happen?
 

Henry

unread,
Oct 30, 2013, 2:52:06 PM10/30/13
to rub...@googlegroups.com
I figured it out:

conn = PG::Connection.new( 'ec2-xx-xx-xx-xx.compute-xx.amazonaws.com', 5432, "", "", "dbname", "postgres", "" )

works. I was using the wrong name for the user.


On Tuesday, October 29, 2013 10:20:39 PM UTC-7, Henry wrote:
Reply all
Reply to author
Forward
0 new messages