Huge problem installing Postgres ruby 1.9 on Vista

Werent there times when windows gems were precompiled for Windows.

#######################
gem install ruby-pg

extconf.rb:4:in `’: uninitialized constant PLATFORM (NameError)

Ok I have edited extconf.rb and add PLATFORM=‘mswin’
only to get:

c:/ruby19/lib/ruby/1.9.1/mkmf.rb:362:in `try_do’: The complier failed to
generat
e an executable file. (RuntimeError)
You have to install development tools first.

Same goes for postgres gem.

########################
Than I tried to go DBI.
gem install dbi
gem install dbd-pg

Building native extensions. This could take a while…
ERROR: Error installing dbd-pg:
ERROR: Failed to build gem native extension.

c:/ruby19/bin/ruby.exe extconf.rb install dbd-pg --no-rdoc --no-ri
ERROR: can’t find pg_config.
HINT: Make sure pg_config is in your PATH
*** extconf.rb failed ***

My postgres server is on Linux. I don’t need it to be installed localy.
But I think it would die anyway because I don have c installed.

#########################

Ok do some handwork. Download source files from sourceforge, unzip, go
to directory, run ruby setup.rb.
Suprisingly it did well. Both for dbi and dbd-pg. But when I try to run
I get:

c:/ruby19/lib/ruby/site_ruby/1.9.1/dbi.rb:312:in rescue in load_driver': Could not load driver (undefined local variable or methode’ for DBI:Module)
(DBI::In
terfaceError)
from c:/ruby19/lib/ruby/site_ruby/1.9.1/dbi.rb:236:in
load_driver' from c:/ruby19/lib/ruby/site_ruby/1.9.1/dbi.rb:154:in_get_full_driver’

    from c:/ruby19/lib/ruby/site_ruby/1.9.1/dbi.rb:139:in `connect'
    from rubyArchiveTesti.rb:16:in `preveriIzXML_Angry'
    from rubyArchiveTesti.rb:124:in `<main>'

##############################
Ok. Delete from site_ruby and copy files from old 1.8 directory.

c:/ruby19/lib/ruby/gems/1.9.1/gems/dbi-0.4.1/lib/dbi.rb:294:in block in load_dr iver': Unable to load driver 'Pg' (underlying error: uninitialized constant DBI: :DBD::Pg) (DBI::InterfaceError) from c:/ruby19/lib/ruby/1.9.1/monitor.rb:190:inmon_synchronize’
from
c:/ruby19/lib/ruby/gems/1.9.1/gems/dbi-0.4.1/lib/dbi.rb:236:in loa d_driver' from c:/ruby19/lib/ruby/gems/1.9.1/gems/dbi-0.4.1/lib/dbi.rb:154:in_ge
t_full_driver’
from
c:/ruby19/lib/ruby/gems/1.9.1/gems/dbi-0.4.1/lib/dbi.rb:139:in con nect' from rubyArchiveTesti.rb:16:inpreveriIzXML_Angry’
from rubyArchiveTesti.rb:124:in `’

Here is where I give up.

Has anybody been able to succesfully install dbi with support for
postgres on ruby 1.9.1 and windows vista (xp).

by
TheR

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs