Forum: Ruby on Rails Postgres 8 on Mac Os X

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
giovanni.giorgi (Guest)
on 2005-11-12 12:50
(Received via mailing list)
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 :(
thank you
jeremy (Guest)
on 2005-11-12 12:50
(Received via mailing list)
-----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 :(

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-----
deirdre (Guest)
on 2005-11-12 12:50
(Received via mailing list)
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.
blair (Guest)
on 2005-11-12 12:50
(Received via mailing list)
Deirdre Saoirse Moen 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 :) ).

Regards,
Blair
deirdre (Guest)
on 2005-11-12 12:50
(Received via mailing list)
On Nov 11, 2005, at 6:02 PM, Blair Zajac wrote:

> committer, this interests me and would like to see it fixed :) ).
It's been long enough that I don't recall specifics. Next time I'll
take notes.
giovanni.giorgi (Guest)
on 2005-11-13 00:28
(Received via mailing list)
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?
david.felstead (Guest)
on 2005-11-13 01:19
(Received via mailing list)
You need to tell extconf.rb where to look for your libraries - so try
this:

sudo gem install postgres -- --with-pgsql-include-dir=<include file
directory> --with-pgsql-lib-dir=<library directory>

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
giovanni.giorgi (Guest)
on 2005-11-13 17:10
(Received via mailing list)
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
aly.dharshi (Guest)
on 2005-11-14 19:27
(Received via mailing list)
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 Moen wrote:
>>>
> It's been long enough that I don't recall specifics. Next time I'll
> take notes.
>

--
Aly S.P Dharshi
aly.dharshi@telus.net

	 "A good speech is like a good dress
	  that's short enough to be interesting
	  and long enough to cover the subject"
blair (Guest)
on 2005-11-14 22:02
(Received via mailing list)
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
This topic is locked and can not be replied to.