Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native compile on windows triggers load errors #55

Closed
ged opened this issue Dec 3, 2010 · 5 comments
Closed

Native compile on windows triggers load errors #55

ged opened this issue Dec 3, 2010 · 5 comments

Comments

@ged
Copy link
Owner

ged commented Dec 3, 2010

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.

@ged
Copy link
Owner Author

ged commented Dec 6, 2010

Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).


Ah, right. That check assumes it's going to be the binary build. I'll use the sqlite3 strategy for 0.10.1; thanks for reporting this!

@ged
Copy link
Owner Author

ged commented Dec 6, 2010

Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).


Fix require for natively-compiled extension under Windows. (fixes #55)

@ged ged closed this as completed Dec 6, 2010
@ged
Copy link
Owner Author

ged commented Jan 10, 2011

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


Thank you Michael.

Any word on a release with this fix? Users are stuck at pg 0.9.0 because of this.

Thank you.

@ged
Copy link
Owner Author

ged commented Jan 11, 2011

Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).


I was waiting on word back from the reporter of <<issue 56>>, but I'll go ahead and release without it.

@ged
Copy link
Owner Author

ged commented Jan 11, 2011

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


Thank you :-)

@ged ged added this to the Pending milestone Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant