Re: Trying to use Heroku and Postgresql

2013-10-06 Thread Zeynel
Yes, it turned out that 'export' is for unix, I had to use 'set' and it worked. This was suggested by juan.facorro at SO: http://stackoverflow.com/questions/19204548/how-do-you-connect-to-local-postgresql-in-heroku#comment28425326_19204548 On Saturday, October 5, 2013 5:13:53 PM UTC-4, Bruce Ada

Re: Trying to use Heroku and Postgresql

2013-10-05 Thread Zeynel
In the tutorial they add DATABASE_URL while deploying, at the last step: https://devcenter.heroku.com/articles/clojure-web-application#deploy with this command: $ heroku addons:add heroku-postgresql:dev -> Adding heroku-postgresql:dev to stormy-fog-408... done, v2 (free) I don't understand

Re: Trying to use Heroku and Postgresql

2013-10-05 Thread Zeynel
Thanks. I found this article https://devcenter.heroku.com/articles/connecting-to-relational-databases-on-heroku-with-java and I tried c:\Users\a\CLOJURE\shouter\src>heroku config !No app specified. !Run this command from an app folder or specify which app to use with --app APP. I

Re: Trying to use Heroku and Postgresql

2013-10-05 Thread Bruce Adams
(System/getenv "DATABASE_URL") is returning nil. This will happen when the system environment variable DATABASE_URL is not defined. - Bruce On Sat, Oct 5, 2013, at 04:54 PM, Zeynel wrote: I am going through this Heroku tutorial [1]https://devcenter.heroku.com/articles/clojure-web-applicati o

Re: Trying to use Heroku and Postgresql

2013-10-05 Thread Zeynel
It seems that the it did not create the database because it already existed! But now I am having a problem with the next command to export the database to the shell (as explained in the tutorial): c:\Users\a\CLOJURE\shouter>export DATABASE_URL=postgresql://localhost:5432/shout er 'export' is no

Re: Trying to use Heroku and Postgresql

2013-10-05 Thread Zeynel
I figured that I need to keep the command window where I initialized the database open. What I thought was hung autovacuum launcher, it was actually the LOG. So in another cmd window I tried to created the database "shouter" but I get databse creation failed error. What am I doing wrong? c:\>c

Trying to use Heroku and Postgresql

2013-10-05 Thread Zeynel
I am going through this Heroku tutorial https://devcenter.heroku.com/articles/clojure-web-application. I am getting the following error when I try to create a table in the local Postgresql database user=>(sql/with-connection (System/getenv "DATABASE_URL") (sql/create-table :testi