Skip to content

Native compile on windows triggers load errors #55

@ged

Description

@ged

Original report by Luis Lavena (Bitbucket: luislavena, GitHub: luislavena).


Hello,

I noticed version 0.10.0 lack Windows binaries, so I went ahead and use RubyInstaller + DevKit to install and compile:

gem install pg -- --with-pg-dir=X:

(X: was my subst drive from PostgreSQL 8.3)

Now, everything compiled fine, but when attempt to load the gem:

#!ruby

require 'rubygems'
require 'pg'

Received the following output:

LoadError: no such file to load -- 1.8/pg_ext
        from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from C:/Users/Luis/.gem/ruby/x86-mingw32/1.8/gems/pg-0.10.0/lib/pg.rb:10
        from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from (irb):2

I think the pg library should attempt to find the extension in the normal place before, as we do for sqlite3-ruby:

https://github.com/luislavena/sqlite3-ruby/blob/master/lib/sqlite3.rb#L1-7

Cheers.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions