I've also run into issues with Postgres.app and Induction, Scott. They definitely need more time to bake, especially Induction.
You might try creating the postgres role yourself: https://github.com/mattt/PostgresApp/issues/58 (scroll to the 2nd to last comment) -- Patrick On Dec 6, 2012, at 11:17 am, Scott Olmsted <[email protected]> wrote: > I want to run a demo Rails app supplied with with a postgres dump, and use > Postgres.app to run PostgreSQL, but I can't get past one error. > > I have removed all other installations of postgres, including the one that > came with Mountain Lion: > > $ which psql > /Applications/Postgres.app/Contents/MacOS/bin/psql > > When I run Postgres.app I see the usual half-dozen postgres processes. When I > stop it I see none, and attempting to access a database via Induction fails > with appropriate error messages. > > I have the database 'piggybak_demo' created. I am the owner and can access it > via psql and via Induction: > > $ psql > psql (9.1.4) > Type "help" for help. > scott=# \l > List of databases > Name | Owner | Encoding | Collate | Ctype | Access privileges > ---------------+-------+----------+---------+-------+------------------- > piggybak_demo | scott | UTF8 | en_US | en_US | > postgres | scott | UTF8 | en_US | en_US | > scott | scott | UTF8 | en_US | en_US | > [... and 2 others] > (5 rows) > > I used psql to populate the database from the dump and I can see that the > data is there. > > I followed the instructions at http://postgresapp.com/documentation to modify > my path and the .env file to run with Foreman: > > $ cat .env > DATABASE_URL=postgres://postgres@localhost/piggybak_demo > RACK_ENV=development > PORT=3600 > > I uninstalled the 'pg' gem and ran 'bundle install' again to make sure it was > pointed to my one and only postgres installation. Here is the database.yml > file: > > development: > adapter: postgresql > database: piggybak_demo > host: localhost > username: scott > password: > > I've tried it with and without 'scott' as the username, and also without the > username and password lines altogether. > > All produce this error: > > $ foreman start web > 10:55:42 web.1 | started with pid 17561 > 10:55:47 web.1 | > /Users/scott/.rvm/gems/ruby-1.9.3-p286@piggybak_demo/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1213:in > `initialize': FATAL: role "postgres" does not exist (PGError) > > Seems like this shouldn't happen, with Postgres.app I'm supposed to be able > to access my data without creating a 'postgres' role. I'm hoping someone will > have an idea what I can do to use Postgres.app without doing that. > > Thanks, > > Scott > > > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
