[code]Building native extensions. This could take a while…
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for pg_config… no
checking for libpq-fe.h… *** 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:/Ruby/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
C:/Ruby/lib/ruby/1.9.1/mkmf.rb:368:in try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:452:intry_cpp’
from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:853:in block in find_header' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:693:inblock in checking_for’
from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:280:in block (2 levels) in postpone ' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:254:inopen’
from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:280:in block in postpone' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:254:inopen’
from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:276:in postpone' from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:692:inchecking_for’
from C:/Ruby/lib/ruby/1.9.1/mkmf.rb:852:in find_header' from extconf.rb:123:in’
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.9.1/gems/pg-0.10.0 fo
r inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.9.1/gems/pg-0.10.0/ext/gem_make.out[/code]
a w database.yml mam:
checking for libpq-fe.h... *** extconf.rb failed ***
Brakuje pliku libpq-fe.h, jest on w plikach nagłówkowych klienta postgresa, w linuksach byłby to pakiet w stylu postgres-dev, ale jak to pod windowsem zrobić? Poguglaj za “windows postgres headers”, “windows pg gem”.
dodałem do PATH ścieżkę do postgresql/bin
teraz wywala coś takiego:
[code]Building native extensions. This could take a while…
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
C:/Ruby/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:/Ruby/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 `’
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.9.1/gems/pg-0.10.0 fo
r inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.9.1/gems/pg-0.10.0/ext/gem_make.out[/code]
ps> dodam, że przy rails 2.3.2 nie ma błędów od bazy.
ps2> zastanawiam się nad skorzystaniem jakiejś dystrybucji linuxa, czy w linuxie są też problemy przy użytkowaniu ruby+rails+postgres? co polecacie?