Comments (4)
Original comment by Anonymous.
First off, THANKS for the great work in the pg gem.
Interesting request. Many people hit this problem. In my recent blog post
(http://rails.vandenabeele.com/blog/2011/11/26/installing-ruby-and-rails-with-rvm-on-ubuntu-11-dot-10/)
I point to this problem and I am sure there must be another 100 blog posts
pointing this out.
Is there a structural way for a gem to explicitly mention the dependency
on system libraries (depending on the exact operating system it is
turning on; so it could say:
#!ruby
if dev_lib_missing
problem_report =
case OperatingSystem
when /Ubuntu|Debian/
"Install the libpq-dev package"
when /RedHat/
"Install ...
when /Darwin/
"Install ...
else
"Install the libraries with the postgresql header files"
end
end
...
end
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
@jrgifford: While I'd ideally like to provide good diagnostics for everyone who might want to use the library, mentioning prerequisites for every conceivable packaging strategy isn't realistic. I'd argue that if someone is installing a gem on a system that breaks software up into -dev and non-dev variants, they should either use the native packaging system to do it (as it's capable of expressing its own dependencies), or know enough about their own systems that they can responsibly install software outside of it without needing to be told that they're missing headers or whatever.
@Anonymous: There isn't any built-in way to do so that I know of, but one of my goals for the next release is to provide better diagnostics for installation problems. Part of that will be generating a better error message if the libraries/headers for libpq aren't found. While I don't think providing help tailored to every possible installation architecture/platform/OS is realistic, I can at the very least mention that it might be in a "-dev" package.
Thanks for the blog post, too! I can't possibly track down everyone who's having a problem, and people seem reluctant to actually ask the maintainer for help, so some useful advice for people googling "Can't find the 'libpq-fe.h header" or whatever will solve a lot of peoples' problems.
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Removing milestone: 0.13.0 (automated comment)
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Given that this gem now has a binary gem, I'm going to close this. Patches will of course be accepted that make it easier to install or diagnose installation problems on all platforms Ruby runs on.
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.