爲了我不斷的驚愕,我不得不在Windows上編程。我試圖爲一些Ruby開發安裝postreSQL。在Windows XP上的gem install pg
[email protected] /c/rubyDev
$ gem install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
c:/Ruby192/bin/ruby.exe extconf.rb
checking for pg_config... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You 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:/Ruby192/bin/ruby
--with-pg
--without-pg
--with-pg-config
--without-pg-config
extconf.rb:33:in ``': No such file or directory - c:\Program Files\PostgreSQL\8.3\bin/pg_config.exe --cflags (Errno::ENOENT)
from extconf.rb:33:in `<main>'
它是什麼樣子,在我看來它顯示對C路徑:\ Program Files文件... \ BIN/pg_config.exe有錯誤的路徑分隔符。望着它是建設有
ENV['PATH'] = "#{pgdir}/bin" + File::PATH_SEPARATOR + ENV['PATH']
這條道路在哪裏文件:: PATH_SEPARATOR定義的extconf.rb,爲什麼是不正確的,是有可能解決?
[無法在Windows上安裝pg gem]( http://stackoverflow.com/questions/4335750/cant-install-pg-gem-on-windows) – Phrogz 2010-12-29 06:40:42