Giter VIP home page Giter VIP logo

Comments (8)

ged avatar ged commented on August 22, 2024

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


No problem! Thanks for reporting it. I'd much rather hear about problems earlier than after it's been reported on a hundred other forums that I don't read, or don't read as often.

From the looks of things (especially the trailing comments of [[https://gist.github.com/970901|a gist that comes up]] in the Google search you provided, I wonder if this isn't caused by a libpq that's compiled against a different version of OpenSSL than your Ruby installation.

I added a comment to the gist you linked; we'll see if it's all https or not.

from ruby-pg.

ged avatar ged commented on August 22, 2024

Original comment by jeromewilson (Bitbucket: jeromewilson, GitHub: jeromewilson).


Good point! The only things I've tried so far have been HTTPS so I'll try a non-SSL connection and report back. Your educated guess as to the cause sounds like it could be spot on, although I'm a Ruby and *nix noob (Mac at the moment) so I wouldn't know how to go about fixing it.

Just tried running otool (see results on the gist: https://gist.github.com/863523#comments) and it looks like you're right about the openssl mismatch. I happily installed Postgres using MacPorts like someone else who commented on the gist so do you have any pointers for fixing it up.

Thanks for your quick reply. It will be amazing to get it working on my Mac as I'm pushing to Heroku each time I want to test anything at the moment :)

from ruby-pg.

ged avatar ged commented on August 22, 2024

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


Any luck with your testing?

from ruby-pg.

ged avatar ged commented on August 22, 2024

Original comment by Anonymous.


Hi - I'm also getting this segmentation error

/Users/khrystlerae/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/net/http.rb:586: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.3]
Abort trap

Narrowed it down to the pg gem.

SSL on. I haven't tried SSL off. Is there anything I can do to help? I don't want to give up using postgres.

from ruby-pg.

ged avatar ged commented on August 22, 2024

Original comment by Anonymous.


I had the exact same problem and spent a few days trying to figure it out before stumbling upon this post: https://github.com/geemus/fog/issues/293

For me, the fix was the move the PG gem declaration to the last line in my gemfile. This seems to cause the correct version of openssl to be loaded and everything worked great!

from ruby-pg.

ged avatar ged commented on August 22, 2024

Original comment by Anonymous.


Update on how I fixed the issue:

There is an issue with OpenSSL using the MacPorts installation of Postgres (and Mysql). I killed MacPorts, switched to Homebrew and it's all working now.

from ruby-pg.

ged avatar ged commented on August 22, 2024

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


If you only have one installation of OpenSSL on your machine, this problem will not happen. That's why switching to Homebrew fixes it -- it uses the version of OpenSSL that's already installed on your machine. When you use Macports, and it installs a different version of OpenSSL and then compiles libpq against it, you're asking for trouble. There's very few reasons to install PostgreSQL via Macports (or Homebrew either, for that matter). The "one-click installer" from EnterpriseDB that's linked from postgresql.org is the latest version, works great, and is compiled with a bunch of the bells and whistles. Oh, and it links against the system libssl, the same one as Ruby.

I'm working on a way to at least detect this problem when 'pg' loads and output a warning, but it'l ultimately not something I can control.

from ruby-pg.

ged avatar ged commented on August 22, 2024

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


Issue #86 was marked as a duplicate of this issue.

from ruby-pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.