I have two computers and in one I can install the gem as expected, but
in the other, I can’t.
The differences are that in the one that I can, I compiled&installed
postgre myself, in the one that doesn’t work, the installation has been
made with the the .dmg file from enterprisedb
Before I uninstall and install again, how I can specific the correct
path to the pg_config --libdir ?
Here is what I get:
sh-3.2# env ARCHFLAGS="-arch i386" gem install --remote postgres
Building native extensions. This could take a while…
ERROR: Error installing postgres:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb install --remote postgres
extconf.rb:73: command not found: pg_config --bindir
extconf.rb:46: command not found: pg_config --includedir
extconf.rb:53: command not found: pg_config --libdir
checking for main() in -lpq… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
–with-pgsql-dir
–without-pgsql-dir
–with-pgsql-include
–without-pgsql-include=${pgsql-dir}/include
–with-pgsql-lib
–without-pgsql-lib=${pgsql-dir}/lib
–with-pqlib
–without-pqlib
Could not find PostgreSQL build environment (libraries & headers):
Makefile not created
The libraries are in /usr/local/postresql/ in both computers …
I have two computers and in one I can install the gem as expected, but
in the other, I can’t.
The differences are that in the one that I can, I compiled&installed
postgre myself, in the one that doesn’t work, the installation has been
made with the the .dmg file from enterprisedb
I think the swiches you need to add are --with-pgsql-include-dir and –
with-pgsql-lib-dir. If the .dmg does indeed include the required
headers and libraries, that is.
You could also just go with the postgres-pr (pr for “pure ruby”) gem
if this isn’t a production server.
PS: It’s “pg”, “Postgres” or “PostgreSQL”, not “Postgre”.
I have two computers and in one I can install the gem as expected, but
in the other, I can’t.
The differences are that in the one that I can, I compiled&installed
postgre myself, in the one that doesn’t work, the installation has been
made with the the .dmg file from enterprisedb
I think the swiches you need to add are --with-pgsql-include-dir and –
with-pgsql-lib-dir. If the .dmg does indeed include the required
headers and libraries, that is.
You could also just go with the postgres-pr (pr for “pure ruby”) gem
if this isn’t a production server.
PS: It’s “pg”, “Postgres” or “PostgreSQL”, not “Postgre”.
thanks for the clarification. I don’t know how to add those switches
without getting an error.
as this is not a production server, I’ve installed the postgres-pr gem
without any problem.
I’m going to try to find more info about this pr gem.