My databases.yml makes no mention of root and in my dev environment everything works fine, however following a deployment with Capistrano about an hour ago, I get the following error: PGError in HomeController#index FATAL: role "root" does not exist /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/postgresql_adapter.rb:713:in `connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/postgresql_adapter.rb:713:in `connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/postgresql_adapter.rb:237:in `initialize'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/postgresql_adapter.rb:23:in `new'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/postgresql_adapter.rb:23:in `postgresql_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:in `send'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:in `connection='' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:78:in `connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ query_cache.rb:8:in `cache'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ caching.rb:677:in `perform_action'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:524:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:524:in `process_without_filters'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ filters.rb:685:in `process_without_session_management_support'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ session_management.rb:123:in `process'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:388:in `process'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:171:in `handle_request'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:115:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:126:in `dispatch_cgi'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:9:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:76:in `process'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:74:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:74:in `process'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:159:in `process_client'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:158:in `each'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:158:in `process_client'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `run'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `initialize'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `new'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `run'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in `initialize'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in `new'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in `run'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb: 282:in `run'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb: 281:in `each'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb: 281:in `run'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:128:in `run'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/command.rb: 212:in `run'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19:in `load'' /usr/bin/mongrel_rails:19 The site''s been working fine for weeks, but now it''s down, just as I was starting to build up users ... typical :) -S --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg (Radar)
2008-Mar-04 01:50 UTC
Re: Why would ActiveRecord connect to Postgres as root?
Check your database.yml file again, and again. It does not spontaneously choose one day to go root. On Tue, Mar 4, 2008 at 11:45 AM, Stuart Grimshaw <stuart.grimshaw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > My databases.yml makes no mention of root and in my dev environment > everything works fine, however following a deployment with Capistrano > about an hour ago, I get the following error: > > PGError in HomeController#index > > FATAL: role "root" does not exist > > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/postgresql_adapter.rb:713:in `connect'' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/postgresql_adapter.rb:713:in `connect'' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/postgresql_adapter.rb:237:in `initialize'' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/postgresql_adapter.rb:23:in `new'' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/postgresql_adapter.rb:23:in > `postgresql_connection'' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/abstract/connection_specification.rb:291:in `send'' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/abstract/connection_specification.rb:291:in > `connection='' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/abstract/connection_specification.rb:259:in > `retrieve_connection'' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > connection_adapters/abstract/connection_specification.rb:78:in > `connection'' > /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ > query_cache.rb:8:in `cache'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > caching.rb:677:in `perform_action'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > base.rb:524:in `send'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > base.rb:524:in `process_without_filters'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > filters.rb:685:in `process_without_session_management_support'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > session_management.rb:123:in `process'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > base.rb:388:in `process'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:171:in `handle_request'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:115:in `dispatch'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:126:in `dispatch_cgi'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:9:in `dispatch'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:76:in > `process'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:74:in > `synchronize'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/rails.rb:74:in > `process'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:159:in > `process_client'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:158:in `each'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:158:in > `process_client'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `run'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in > `initialize'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `new'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `run'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in > `initialize'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in `new'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in `run'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb: > 282:in `run'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb: > 281:in `each'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb: > 281:in `run'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:128:in > `run'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/command.rb: > 212:in `run'' > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:281 > /usr/bin/mongrel_rails:19:in `load'' > /usr/bin/mongrel_rails:19 > > The site''s been working fine for weeks, but now it''s down, just as I > was starting to build up users ... typical :) > > -S > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stuart Grimshaw
2008-Mar-04 07:11 UTC
Re: Why would ActiveRecord connect to Postgres as root?
On Mar 4, 1:50 am, "Ryan Bigg (Radar)" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Check your database.yml file again, and again. > > It does not spontaneously choose one day to go root.You would think that wouldn''t you Ryan ... with the passwords removed, database.yml is reproduced below, in full ... # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: postgresql database: footytechs-dev user: footytechs password: password host: localhost # Warning: The database defined as ''test'' will be erased and # re-generated from your development database when you run ''rake''. # Do not set this db to the same as development or production. test: adapter: postgresql database: footytechs-test user: footytechs password: password host: localhost production: adapter: postgresql database: footytechs-prod user: footytechs password: password host: localhost --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---