ruby on rails - Can't install pg gem on Windows -


i've got 2 ruby versions: 1.8.7 , 1.9.2 , postgresql 8.3. cant install pg gem on of them. getting error:

c:/development/ruby187/bin/ruby.exe extconf.rb checking pg_config... yes not recorded checking libpq-fe.h... no can't find 'libpq-fe.h header *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers.  check mkmf.log file more details.  may need configuration options.  provided configuration options:  --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=c:/development/ruby187/bin/ruby  --with-pg  --without-pg  --with-pg-config  --without-pg-config  --with-pg-dir  --without-pg-dir  --with-pg-include  --without-pg-include=${pg-dir}/include  --with-pg-lib  --without-pg-lib=${pg-dir}/lib 

i know it's common problem, haven't found working solution yet... oh, have added c:\program files (x86)\postgresql\8.3\bin path.

the message you're getting clear indication lack correct installation of gem:

could not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. may need configuration options.

there no windows native version of latest release of pg (0.10.0) released yesterday, if install 0.9.0 should install binaries without issues.

anyhow, if want install gem, need build environment installed. if you're using rubyinstaller, need devkit

installation of gem require provide additional options gem installation (like --with-pg-dir)

subst x: "c:\program files (x86)\postgresql\8.3" gem install pg -- --with-pg-dir=x: subst x: /d 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -