>From http://devcenter.heroku.com/articles/cedar, try:

$ heroku addons:add shared-database:5mb

New apps that have the `pg` gem specified in the Gemfile will get this 
automatically. If the app was created a while ago, or if you added the `pg` gem 
after the first push, it wouldn't have added the shared database automatically.

On Jan 11, 2012, at 8:24 AM, Beony wrote:

> 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 heroku@googlegroups.com.
> To unsubscribe from this group, send email to 
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/heroku?hl=en.
> 

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

Reply via email to