I'm trying to get my sinatra app running on the cedar stack but
ENV['DATABASE_URL'] isn't being set by the system so my DataMapper
initialisation is falling back to my local dev db using sqlite

`DataMapper.setup(:default, ENV['DATABASE_URL'] || 'sqlite:///path/to/
mydb.db')`

Which means the app is trying to require "dm-sqlite-adapter" instead
of postgres.

If I use the explicitly documented method from the Heroku docs (see:
http://devcenter.heroku.com/articles/rack#database_access) and use
`DataMapper.setup(:default, ENV['DATABASE_URL'] || 'postgres://
localhost/mydb')` I get the following when trying to access it...

DataObjects::ConnectionError: could not connect to server: Connection
refused
        Is the server running on host "localhost" and accepting
        TCP/IP connections on port 5432?

It's not a particularly complicated application so I don't think I'm
doing anything too far out there.

Any ideas would be most appreciated. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to