Forum: Ruby Huge problem installing Postgres ruby 1.9 on Vista

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Be07c8d0d6867fd9a0d525f7d17600e2?d=identicon&s=25 Damjan Rems (ther)
on 2009-03-27 11:40
Werent there times when windows gems were precompiled for Windows.

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

extconf.rb:4:in `<main>': 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 method `e' 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:in
`mon_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:in `preveriIzXML_Angry'
        from rubyArchiveTesti.rb:124:in `<main>'


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 topic is locked and can not be replied to.