(in /u7/markus/f10-dev/markus-0.9.0) FATAL: Ident authentication failed for user "markus" /var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb:941:in `initialize' /var/lib/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb:941:in `connect' [...] /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1974:in `run' /usr/bin/rake:28 Couldn't create database for {"encoding"=>"unicode", "username"=>"markus", "adapter"=>"postgresql", "database"=>"markus_production", "password"=>"markus"}
Information from Isaac Morland that probably will help with the above:
Markus database set up, password file set up: 10:23 root@services024.student.cs# setuid markus psql -h postgres.student.cs psql (8.4.4, server 8.4.2) Type "help" for help. markus=> \q 10:23 root@services024.student.cs#
[markus@services024]:config$ diff database.yml database.yml.postgresql 19,21c19,22 < # domain socket that doesn't need configuration. < host: postgres.student.cs < port: 5432 --- > # domain socket that doesn't need configuration. Windows does not have > # domain sockets, so uncomment these lines. > #host: localhost > #port: 5432 47c48 < database: markus --- > database: markus_production [markus@services024]:config$ pushd ~/f10-dev/markus-0.9.0; rake db:create --trace; popd ~/f10-dev/markus-0.9.0 ~/f10-dev/markus-0.9.0/config (in /u7/markus/f10-dev/markus-0.9.0) ** Invoke db:create (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config rake aborted! syntax error on line 23, col 22: ` #schema_search_path: myapp,sharedapp,public' /usr/lib/ruby/1.8/yaml.rb:133:in `load' /usr/lib/ruby/1.8/yaml.rb:133:in `load' /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:902:in `database_configuration' /var/lib/gems/1.8/gems/rails-2.3.8/lib/tasks/databases.rake:4 /usr/lib/ruby/1.8/rake.rb:617:in `call' /usr/lib/ruby/1.8/rake.rb:617:in `execute' /usr/lib/ruby/1.8/rake.rb:612:in `each' /usr/lib/ruby/1.8/rake.rb:612:in `execute' /usr/lib/ruby/1.8/rake.rb:578:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:588:in `invoke_prerequisites' /usr/lib/ruby/1.8/rake.rb:585:in `each' /usr/lib/ruby/1.8/rake.rb:585:in `invoke_prerequisites' /usr/lib/ruby/1.8/rake.rb:577:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:564:in `invoke' /usr/lib/ruby/1.8/rake.rb:2027:in `invoke_task' /usr/lib/ruby/1.8/rake.rb:2005:in `top_level' /usr/lib/ruby/1.8/rake.rb:2005:in `each' /usr/lib/ruby/1.8/rake.rb:2005:in `top_level' /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1999:in `top_level' /usr/lib/ruby/1.8/rake.rb:1977:in `run' /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1974:in `run' /usr/bin/rake:28 ~/f10-dev/markus-0.9.0/config
Note that the error line is line 24 of database.yml
, which is commented out, exactly as it was before... yet now it's a syntax error!?
I don't appear to have changed any newline conventions:
[markus@services024]:config$ grep student.cs database.yml | xxd 0000000: 686f 7374 3a20 706f 7374 6772 6573 2e73 host: postgres.s 0000010: 7475 6465 6e74 2e63 730a tudent.cs. [markus@services024]:config$ grep port: database.yml | xxd 0000000: 706f 7274 3a20 3534 3332 0a port: 5432. [markus@services024]:config$ grep 'server defaults' database.yml | xxd 0000000: 2020 2320 5363 6865 6d61 2073 6561 7263 # Schema searc 0000010: 6820 7061 7468 2e20 5468 6520 7365 7276 h path. The serv 0000020: 6572 2064 6566 6175 6c74 7320 746f 2024 er defaults to $ 0000030: 7573 6572 2c70 7562 6c69 630a 2020 2320 user,public. # 0000040: 5468 6520 7365 7276 6572 2064 6566 6175 The server defau 0000050: 6c74 7320 746f 206e 6f74 6963 652e 0a lts to notice.. [markus@services024]:config$so this is puzzling.
If the port isn't set,
diff database.yml database.yml.postgresql 19,21c19,22 < # domain socket that doesn't need configuration. < host: postgres.student.cs < #port: 5432 --- > # domain socket that doesn't need configuration. Windows does not have > # domain sockets, so uncomment these lines. > #host: localhost > #port: 5432 49c50 < # password: markus --- > password: markus
I get the same error as in attempt #1:
FATAL: Ident authentication failed for user "markus" [...] Couldn't create database for {"encoding"=>"unicode", "username"=>"markus", "adapter"=>"postgresql", "database"=>"markus_production"}
Is this possibly because of something nonstandard in our environment? For example, from the file /var/lib/gems/1.8/gems/postgres-0.7.9.2008.01.28/README
:
- How to install ? Follow the instructions below to compile and install: ruby extconf.rb make su (if necessary) make install You may need to specify the directory name for the include files and the -lpq library by using --with-pgsql-include=<include file directory> --with-pgsql-lib=<library directory> For example: ruby extconf.rb --with-pgsql-include=/usr/local/pgsql/include \ --with-pgsql-lib=/usr/local/pgsql/lib
[markus@services024]:config$ diff database.yml database.yml.postgresql 19c19,20 < # domain socket that doesn't need configuration. --- > # domain socket that doesn't need configuration. Windows does not have > # domain sockets, so uncomment these lines. 48,49c49,50 < # username: markus < # password: markus --- > username: markus > password: markus [markus@services024]:config$ !p pushd ~/f10-dev/markus-0.9.0; rake db:create --trace; popd ~/f10-dev/markus-0.9.0 ~/f10-dev/markus-0.9.0/config (in /u7/markus/f10-dev/markus-0.9.0) DEPRECATION WARNING: Rake tasks in vendor/plugins/db-populate/tasks, vendor/plugins/db-populate/tasks, and vendor/plugins/time-warp/tasks are deprecated. Use lib/tasks instead. (called from /var/lib/gems/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10) ** Invoke db:create (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:create rake aborted! undefined method `[]' for nil:NilClass /var/lib/gems/1.8/gems/rails-2.3.8/lib/tasks/databases.rake:55:in `create_database' /var/lib/gems/1.8/gems/rails-2.3.8/lib/tasks/databases.rake:31 /usr/lib/ruby/1.8/rake.rb:617:in `call' /usr/lib/ruby/1.8/rake.rb:617:in `execute' /usr/lib/ruby/1.8/rake.rb:612:in `each' /usr/lib/ruby/1.8/rake.rb:612:in `execute' /usr/lib/ruby/1.8/rake.rb:578:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:564:in `invoke' /usr/lib/ruby/1.8/rake.rb:2027:in `invoke_task' /usr/lib/ruby/1.8/rake.rb:2005:in `top_level' /usr/lib/ruby/1.8/rake.rb:2005:in `each' /usr/lib/ruby/1.8/rake.rb:2005:in `top_level' /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1999:in `top_level' /usr/lib/ruby/1.8/rake.rb:1977:in `run' /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1974:in `run' /usr/bin/rake:28 ~/f10-dev/markus-0.9.0/config [markus@services024]:config$