Tuesday, October 18, 2011

Postgre

I've been trying for a while now to learn how to establish a connection with the Postgre SQL database that Heroku uses. It's a bit like besieging a city; I'm getting there, just ever so slowly, mostly because I'm also carrying all the weight of unfamiliarity with the language.

The fact that Heroku doesn't document its stuff very well doesn't help either. There do not seem to be nearly as many examples available as there are for say, the Google App Engine or for the Android platform. I'm guessing it's a smaller community.

There seems to be some support on Stack Overflow, but often questions are posed by people who have a much bigger clue what they are doing than I do.

I have had some success: I am running a copy of Postgre on my computer and did successfully connect to it through the Ruby test console. The connection will be established in a different way though when it is up on Heroku. In my local server, I specified the location, port, user, password, and a few other things, whereas it seems the Heroku connection must be established with a single string with all that information compacted inside. There is, as far as I can tell, a version of the method call I made that takes a single string, but I'm suspicious as to whether it will work.

Anyhow, back to besieging the city.

No comments:

Post a Comment