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 -- Plus I remember being impressed with Ada because you could write an infinite loop without a faked up condition. The idea being that in Ada the typical infinite loop would normally be terminated by detonation. -Larry Wall [ [ [ JJ ] ] ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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. > 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 :(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-----
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. -- _Deirdre http://deirdre.net
Deirdre Saoirse Moen wrote:> > 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.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 -- Blair Zajac, Ph.D. <blair-szbw9MROnEZWk0Htik3J/w@public.gmane.org> Subversion and Orca training and consulting http://www.orcaware.com/svn/
On Nov 11, 2005, at 6:02 PM, Blair Zajac wrote:> Deirdre Saoirse Moen wrote: >> 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. > > What issues did you have in installing via Fink (as a Fink > 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. -- _Deirdre http://deirdre.net
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? On 12/nov/05, at 00:22, Jeremy Kemper wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > 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. >> 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 :( > > 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----- > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- [ [ [ JJ ] ] ] | First, they ignore you. Then they laugh | at you. Then they fight you. Then you win http://www.siforge.org | Mahatma Ghandi
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 On 11/13/05, Giovanni Giorgi <giovanni.giorgi-WkPdTDPGNoJAfugRpC6u6w@public.gmane.org> wrote:> 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? > > > On 12/nov/05, at 00:22, Jeremy Kemper wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > 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. > >> 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 :( > > > > 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----- > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > -- > [ [ [ JJ ] ] ] | First, they ignore you. Then they laugh > | at you. Then they fight you. Then you win > http://www.siforge.org | Mahatma Ghandi > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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 On 13/nov/05, at 01:18, David Felstead wrote:> 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>-- [ [ [ JJ ] ] ] | Wondering whether a machine can think is | like asking if a submarine can swim. http://www.siforge.org | -- From someone''s .sig
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:> On Nov 11, 2005, at 6:02 PM, Blair Zajac wrote: > >> Deirdre Saoirse Moen wrote: >> >>> 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. >> >> >> What issues did you have in installing via Fink (as a Fink 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. >-- Aly S.P Dharshi aly.dharshi-EynCeXvFgoheoWH0uzbU5w@public.gmane.org "A good speech is like a good dress that''s short enough to be interesting and long enough to cover the subject"
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