Comments (8)
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.
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.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Any luck with your testing?
from ruby-pg.
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.
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.
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.
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.
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)
- Segmentation fault HOT 28
- Sonoma: getaddrinfo segmentation fault HOT 2
- Segmentation fault in ruby:3.2.2-alpine3.18 docker image HOT 2
- Wrong binary conversion on x86 (32bit intel) arch causing test failures HOT 4
- Bad IAM Token against Amazon Aurora Postgres: Out of memory error HOT 2
- Attempting to execute a sql file with `\set ...` raises errors HOT 3
- conn.exec writing "INFO" statements to stderr instead of stdout HOT 2
- Segfault on ruby 3.2.2, pg 1.5.4 HOT 2
- Error ruby(39749,0x1e1f05300) malloc: double free for ptr 0x13c6bfa00 HOT 1
- Segmentation fault when connecting to RDS HOT 11
- Broken links in documentation HOT 3
- connection.reset don't check again DNS HOT 6
- Usage with ApacheAGE for Postgresql HOT 2
- Add BigDecimal to gemspec for Ruby 3.3/4 HOT 2
- Binary Windows gem no longer available for Ruby v3.3 since v1.5.6 HOT 2
- Test failure with modified `RUBY_PG_TEST_DIR` HOT 2
- Q: Is it possible to handle composite values like `row(123, 'str', true)` ? HOT 1
- Dereference of null in alloc_query_params HOT 1
- TypeError PG::TypeMap undefined method `key?' for nil if !type_map.key?(oid) HOT 2
- Query hangs when using async_exec HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-pg.