pg_config, ruby pg, postgresql 9.0 problem after upgrade, centos 5
There are various config options you can add to the gem install, like -with-opt-dir
, --with-pg-dir
and --with-pg-config
. Look at this mailing list thread:
$ gem --version1.3.7$ ruby --versionruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]$ cat /etc/redhat-release CentOS release 5.4 (Final)$ uname -mx86_64sudo yum list installed | grep postgre (see what you have installed)sudo yum list available | grep postgre (I was missing postgresql-devel)sudo yum install postgresql-devel (I installed it)sudo gem install pg (no error this time!)$ gem list --local | grep pgpg (0.11.0)
This seems like a pg config file location error,
gem install pg -- --with-pgsql-lib=/usr/pgsql-9.0/lib --with-pg-config=/usr/pgsql-9.1/bin/pg_config
solves it!!
gem install pg -- --with-pgsql-lib=/usr/pgsql-9.0/lib --with-pg-config=/usr/pgsql-9.1/bin/pg_config/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':It seems your ruby installation is missing psych (for YAML output).To eliminate this warning, please install libyaml and reinstall your ruby.Building native extensions. This could take a while...Successfully installed pg-0.14.01 gem installedInstalling ri documentation for pg-0.14.0...Installing RDoc documentation for pg-0.14.0...