Launch
gem install pg -v '0.15.1'
with mistakes:
Create your own extensions. This may take some time ... ERROR: Error installing pg: ERROR: Failed to create native gem extension. /home/askar/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If cannot try, try again with --with-pg-config = / path / to / pg_config check for libpq-fe.h ... no Cannot find the header libpq-fe.h * extconf.rb failed * The Makefile could not be created for some reason, the necessary libraries and / or headers may have been missing. Check the mkmf.log file for more details. You may need configuration options.The configuration options provided are: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include = $ {opt-dir} / include --with-opt-lib - without-opt-lib = $ {opt-dir} / lib --with-make-prog --without-make-prog --srcdir =. --curdir --ruby = / home / askar / .rvm / rubies / ruby-1.9.3-p429 / bin / ruby ββ--with-pg --without-pg --with-pg-dir --without -pg-dir --with-pg-include --without-pg-include = $ {pg-dir} / include --with-pg-lib --without-pg-lib = $ {pg-dir} / lib --with-pg-config --without-pg-config --with-pg_config --without-pg_configGem files will be installed in /home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1 for verification. Results recorded in /home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1/ext/gem_make.out
Create your own extensions. This may take some time ... ERROR: Error installing pg: ERROR: Failed to create native gem extension.
/home/askar/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If
cannot try, try again with --with-pg-config = / path / to / pg_config check for libpq-fe.h ... no Cannot find the header libpq-fe.h * extconf.rb failed * The Makefile could not be created for some reason, the necessary libraries and / or headers may have been missing. Check the mkmf.log file for more details. You may need configuration options.
The configuration options provided are: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include = $ {opt-dir} / include --with-opt-lib - without-opt-lib = $ {opt-dir} / lib --with-make-prog --without-make-prog --srcdir =. --curdir --ruby = / home / askar / .rvm / rubies / ruby-1.9.3-p429 / bin / ruby ββ--with-pg --without-pg --with-pg-dir --without -pg-dir --with-pg-include --without-pg-include = $ {pg-dir} / include --with-pg-lib --without-pg-lib = $ {pg-dir} / lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config
Gem files will be installed in /home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1 for verification. Results recorded in /home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1/ext/gem_make.out
I use
You need to install your own extension for pg gem.
pg
sudo apt-get install libpq-dev