Postgres 8 on Mac Os X


#1

Hi,
I am rather newbie to Rails.
I have installed postgresql via fink on Mac Os X Tiger and all works
fine.
I have configured it and created my two database (dev and test).
When I issue
rake migrate VERSION=0
to start to play, I got a fatal rake error (“rake aborted! End of
file reached”)
and a strange error on postgres log:
LOG: invalid length of startup packet

Someone can give me a hint of what can be the problem?

I am using the packet
postgres-pr (0.4.0)
to connect to it.
It works fine on Windows :frowning:
thank you


#2

Deirdre Saoirse M. wrote:

I had real issues installing via fink, but no issues installing from
source.

What issues did you have in installing via Fink (as a Fink committer,
this
interests me and would like to see it fixed :slight_smile: ).

Regards,
Blair


#3

On Nov 11, 2005, at 6:02 PM, Blair Z. wrote:

committer, this interests me and would like to see it fixed :slight_smile: ).
It’s been long enough that I don’t recall specifics. Next time I’ll
take notes.


#4

Thank you all for the help.
I have just installed Postgres 8.1 from sources but I have no luck
with the postgres gem
sudo gem install postgres
print out a complain:

checking for gethostname()… yes
checking for PQsetdbLogin() in -lpq… no
Could not find PostgreSQL libraries: Makefile not created
Results logged to /usr/lib/ruby/gems/1.8/gems/postgres-0.7.1/
gem_make.out

I have configured LDFLAGS and CCFLAGS to look in the postgres include
directory:
for example LDFLAGS is
-L/sw/lib -L/usr/local/pgsql/lib

But I cannot compile the module.
how can I fix it?


#5

Is there such a thing as LD_LIBRARY_PATH or LD_RUN_PATH that may need to
be updated, as you have installed things from scratch/source?

Deirdre Saoirse M. wrote:

It’s been long enough that I don’t recall specifics. Next time I’ll
take notes.


Aly S.P Dharshi
removed_email_address@domain.invalid

 "A good speech is like a good dress
  that's short enough to be interesting
  and long enough to cover the subject"

#6

You need to tell extconf.rb where to look for your libraries - so try
this:

sudo gem install postgres – --with-pgsql-include-dir= --with-pgsql-lib-dir=

I haven’t done it in a long while - but as I recall using a blank ‘–’
parameter is the way to pass extconf.rb parameters via gem.

Cheers!

-DF


#7

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 11, 2005, at 3:17 PM, Giovanni Giorgi wrote:

Someone can give me a hint of what can be the problem?

I am using the packet
postgres-pr (0.4.0)
to connect to it.
It works fine on Windows :frowning:

I haven’t tried in Windows, but I’ve had good luck with
gem install postgres
with PostgreSQL 8.0 and 8.1 on my Mac.

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDdSfNAQHALep9HFYRAuhyAJ9lH+F0Bq4JYk1HqgBXeaL7j/yDKgCfUp5B
0Mf+t4cfmFFTRyuwo0hC2ys=
=A5wr
-----END PGP SIGNATURE-----


#8

On Nov 11, 2005, at 3:17 PM, Giovanni Giorgi wrote:

I have installed postgresql via fink on Mac Os X Tiger and all
works fine.

[…]

Someone can give me a hint of what can be the problem?

I had real issues installing via fink, but no issues installing from
source.

I don’t know if that’s related to your issue, though.

I suspect it’s more likely the installation of the postgres gem that
may be an issue.


#9

Thank you, it worked very well!
To other newbie with default postgres installation:

sudo gem install postgres – --with-pgsql-include-dir=/usr/local/
pgsql/include --with-pgsql-lib-dir=/usr/local/pgsql/lib


#10

Aly Dharshi wrote:

Is there such a thing as LD_LIBRARY_PATH or LD_RUN_PATH that may need to
be updated, as you have installed things from scratch/source?

Yes, OS X supports versions of these.

Check out man dyld.

The Fink build of Postgresql does make use of some of these.

Regards,
Blair