Can’t find the ‘libpq-fe.h header when trying to install pg gem

I am using the Ruby on Rails 3.1 pre version. I like to use PostgreSQL, but the problem is installing the pg gem. It gives me the following error: $ gem install pg Building native extensions. This could take a while… ERROR: Error installing pg: ERROR: Failed to build gem native extension. /home/u/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb checking … Read more

PostgreSQL error: Fatal: role “username” does not exist

I’m setting up my PostgreSQL 9.1. I can’t do anything with PostgreSQL: can’t createdb, can’t createuser; all operations return the error message Fatal: role h9uest does not exist h9uest is my account name, and I sudo apt-get install PostgreSQL 9.1 under this account. Similar error persists for the root account. 17 s 17 Use the … Read more

Getting error: Peer authentication failed for user “postgres”, when trying to get pgsql working with rails

I’m getting the error: FATAL: Peer authentication failed for user “postgres” when I try to make postgres work with Rails. Here’s my pg_hba.conf, my database.yml, and a dump of the full trace. I changed authentication to md5 in pg_hba and tried different things, but none seem to work. I also tried creating a new user … Read more