Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Conversation

magro
Copy link
Contributor

@magro magro commented Jul 1, 2013

Heroku like db urls were supported with 'postgresql' protocol.
In my heroku app, the $DATABASE_URL was set with 'postgres' protocol,
so that the db url could not be parsed:

2013-07-01T11:51:41.448436+00:00 app[web.1]: [info] application - $DATABASE_URL: postgres://xyz:xyz@ec2-xx-xx-xx-xx.compute-1.amazonaws.com:5432/somedb 2013-07-01T11:51:41.521684+00:00 app[web.1]: java.util.NoSuchElementException: key not found: host 2013-07-01T11:51:41.517811+00:00 app[web.1]: Oops, cannot start the server. 2013-07-01T11:51:41.522280+00:00 app[web.1]: at scala.collection.MapLike$class.apply(MapLike.scala:141) 2013-07-01T11:51:41.522379+00:00 app[web.1]: at scala.collection.AbstractMap.apply(Map.scala:58) 2013-07-01T11:51:41.523042+00:00 app[web.1]: at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:63) 2013-07-01T11:51:41.522541+00:00 app[web.1]: at Global$.getDbConfig(Global.scala:42) 2013-07-01T11:51:41.522458+00:00 app[web.1]: at com.github.mauricio.async.db.postgresql.util.URLParser$.parse(URLParser.scala:45) 

This change supports both 'postgresql' and 'postgres' protocols.

Heroku like db urls were supported with 'postgresql' protocol. In my heroku app, the DATABASE_URL was set with 'postgres' protocol, so that the db url could not be parsed. This change supports both 'postgresql' and 'postgres' protocols.
mauricio added a commit that referenced this pull request Jul 1, 2013
Support 'postgres' protocol in heroku like db urls.
@mauricio mauricio merged commit c4e7b59 into mauricio:master Jul 1, 2013
@mauricio
Copy link
Owner

mauricio commented Jul 1, 2013

Awesome!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants