I installed ruby, postgres and rb-postgres like is mentioned here: http://wiki.rubyonrails.com/rails/show/ HowtoInstallOnOSXTigerUsingDarwinPorts The only thing is that I did not use the -b switch when installing rb- postgres because I always got an error with -b option. But I am getting the following error when I try to go to any page: No such file to load -- postgres It seems like the adapter is not working properly. How can I get it to work properly? I tried installing the adapter from gems but I would get the following error using that one: "invalid length of startup packet" or "end of file reached" Anyone ever come across this problem and find a solution to it? :-) I really appreciate your feedback! Your Friend, John Kopanas
On Mon, 2005-06-27 at 23:24 -0400, John Kopanas wrote:> I installed ruby, postgres and rb-postgres like is mentioned here: > > http://wiki.rubyonrails.com/rails/show/ > HowtoInstallOnOSXTigerUsingDarwinPorts > > The only thing is that I did not use the -b switch when installing rb- > postgres because I always got an error with -b option. > > But I am getting the following error when I try to go to any page: > > No such file to load -- postgres > > It seems like the adapter is not working properly. How can I get it > to work properly? > > I tried installing the adapter from gems but I would get the > following error using that one: > > "invalid length of startup packet" or "end of file reached" > > Anyone ever come across this problem and find a solution to it? :-) > > I really appreciate your feedback! > > Your Friend, > > John Kopanas >What command did you try to install the PostgreSQL adapter with? $ gem install postgres-pr ? -Robby -- /****************************************************** * Robby Russell, Owner.Developer.Geek * PLANET ARGON, Open Source Solutions & Web Hosting * Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 * www.planetargon.com | www.robbyonrails.com *******************************************************/
On 6/27/05, John Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote:> I installed ruby, postgres and rb-postgres like is mentioned here: > > http://wiki.rubyonrails.com/rails/show/ > HowtoInstallOnOSXTigerUsingDarwinPorts > > The only thing is that I did not use the -b switch when installing rb- > postgres because I always got an error with -b option. > > But I am getting the following error when I try to go to any page: > > No such file to load -- postgres > > It seems like the adapter is not working properly. How can I get it > to work properly?Its not that it isn''t working, but that it isn''t found. This could indicate a few things. After you installed Ruby and Rails, did you edit the shebang of the rails scripts to point to the darwinports version of ruby? "#!/usr/local/bin/ruby" => "#!/opt/local/bin/ruby" Did you add /opt/local/bin/ruby to the start of your path? Check to make sure the extension installed at all. It should be somewhere like: /opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.1.0/postgres.bundle> > I tried installing the adapter from gems but I would get the > following error using that one: > > "invalid length of startup packet" or "end of file reached" >Possibly try compiling the postgresql adapter from source? This is the route I took and has worked beautifully. I also compiled my own ruby rather than use darwinports.> Anyone ever come across this problem and find a solution to it? :-)When all else fails, try the pure ruby postgres bindings: sudo gem install postgres-pr> > I really appreciate your feedback! > > Your Friend, > > John Kopanas >Good luck! Jason
Yes that is what I tried. On 28-Jun-05, at 1:11 AM, Robby Russell wrote:> On Mon, 2005-06-27 at 23:24 -0400, John Kopanas wrote: > >> I installed ruby, postgres and rb-postgres like is mentioned here: >> >> http://wiki.rubyonrails.com/rails/show/ >> HowtoInstallOnOSXTigerUsingDarwinPorts >> >> The only thing is that I did not use the -b switch when installing >> rb- >> postgres because I always got an error with -b option. >> >> But I am getting the following error when I try to go to any page: >> >> No such file to load -- postgres >> >> It seems like the adapter is not working properly. How can I get it >> to work properly? >> >> I tried installing the adapter from gems but I would get the >> following error using that one: >> >> "invalid length of startup packet" or "end of file reached" >> >> Anyone ever come across this problem and find a solution to it? :-) >> >> I really appreciate your feedback! >> >> Your Friend, >> >> John Kopanas >> >> > > What command did you try to install the PostgreSQL adapter with? > > $ gem install postgres-pr ? > > -Robby > > > -- > /****************************************************** > * Robby Russell, Owner.Developer.Geek > * PLANET ARGON, Open Source Solutions & Web Hosting > * Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 > * www.planetargon.com | www.robbyonrails.com > *******************************************************/ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >John Kopanas http://www.thedatingguy.com - Online Dating the way it should be. http://blog.thedatingguy.com
I thought I got it with your help but then I ran into another problem. I changed the shebang like you suggested but when I start up the webrick I get an active_support not found. One problem leads to another... any clue why I am getting this problem? I am also trying to install ruby from source using ./configure, make, make test, make install. When I put that version in the shebang and try to get webrick to startup I get a no such file to load -- socket problem. I think what is happening is that I am using a mixture of gem and ports and everything is pointing in the wrong direction. When I tried to install things the gem way I am getting an error of "end of file reached". hmmm... not cool. Any suggestions on which way I should take and how I can get it to work? I greatly appreciate this! On 28-Jun-05, at 9:26 AM, Jason Foreman wrote:> On 6/27/05, John Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote: > >> I installed ruby, postgres and rb-postgres like is mentioned here: >> >> http://wiki.rubyonrails.com/rails/show/ >> HowtoInstallOnOSXTigerUsingDarwinPorts >> >> The only thing is that I did not use the -b switch when installing >> rb- >> postgres because I always got an error with -b option. >> >> But I am getting the following error when I try to go to any page: >> >> No such file to load -- postgres >> >> It seems like the adapter is not working properly. How can I get it >> to work properly? >> > > Its not that it isn''t working, but that it isn''t found. This could > indicate a few things. > > After you installed Ruby and Rails, did you edit the shebang of the > rails scripts to point to the darwinports version of ruby? > "#!/usr/local/bin/ruby" => "#!/opt/local/bin/ruby" > > Did you add /opt/local/bin/ruby to the start of your path? > > Check to make sure the extension installed at all. It should be > somewhere like: > /opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.1.0/postgres.bundle > > > >> >> I tried installing the adapter from gems but I would get the >> following error using that one: >> >> "invalid length of startup packet" or "end of file reached" >> >> > > Possibly try compiling the postgresql adapter from source? This is > the route I took and has worked beautifully. I also compiled my own > ruby rather than use darwinports. > > > >> Anyone ever come across this problem and find a solution to it? :-) >> > > When all else fails, try the pure ruby postgres bindings: > > sudo gem install postgres-pr > > > >> >> I really appreciate your feedback! >> >> Your Friend, >> >> John Kopanas >> >> > > > Good luck! > > Jason > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >John Kopanas http://www.thedatingguy.com - Online Dating the way it should be. http://blog.thedatingguy.com
On 6/28/05, John Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote:> I thought I got it with your help but then I ran into another problem. > > I changed the shebang like you suggested but when I start up the > webrick I get an active_support not found. One problem leads to > another... any clue why I am getting this problem? >It sounds like maybe your ''gem install rails'' happened in the standard ruby, not the darwinports ruby. edit your ~/.profile and put in an "export PATH=/opt/local/bin:$PATH" if you haven''t yet. Then exit the terminal and start it again. Both ''which ruby'' and ''which gem'' should point to /opt/local/bin now. Then do a ''sudo gem install rails''. Then try running webrick again.> I am also trying to install ruby from source using ./configure, make, > make test, make install. When I put that version in the shebang and > try to get webrick to startup I get a no such file to load -- socket > problem. > > I think what is happening is that I am using a mixture of gem and > ports and everything is pointing in the wrong direction. >This is certainly what is happening. You''ve got bits from darwinports, hand compiled, and possibly even the default ones that ship all fighting against each other. The ''gotcha'' for me was that after compiling my own ruby, I had to set the path to point to it (/usr/local/bin), then exit the current terminal and start a new one before I compiled rubygems and installed the rest.> When I tried to install things the gem way I am getting an error of > "end of file reached". hmmm... not cool.This might be because its using the standard ruby gems built against the Apple shipped version of ruby.> > Any suggestions on which way I should take and how I can get it to work? >Try the first suggestion about the path and reinstalling rails. If that doesn''t work, I can walk you through doing a manual compile and install of everything you should need. I compiled each piece myself, and with the exception of one little hiccup in readline, it all compiles very nicely.> I greatly appreciate this! > >NP! Jason> On 28-Jun-05, at 9:26 AM, Jason Foreman wrote: > > > On 6/27/05, John Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote: > > > >> I installed ruby, postgres and rb-postgres like is mentioned here: > >> > >> http://wiki.rubyonrails.com/rails/show/ > >> HowtoInstallOnOSXTigerUsingDarwinPorts > >> > >> The only thing is that I did not use the -b switch when installing > >> rb- > >> postgres because I always got an error with -b option. > >> > >> But I am getting the following error when I try to go to any page: > >> > >> No such file to load -- postgres > >> > >> It seems like the adapter is not working properly. How can I get it > >> to work properly? > >> > > > > Its not that it isn''t working, but that it isn''t found. This could > > indicate a few things. > > > > After you installed Ruby and Rails, did you edit the shebang of the > > rails scripts to point to the darwinports version of ruby? > > "#!/usr/local/bin/ruby" => "#!/opt/local/bin/ruby" > > > > Did you add /opt/local/bin/ruby to the start of your path? > > > > Check to make sure the extension installed at all. It should be > > somewhere like: > > /opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.1.0/postgres.bundle > > > > > > > >> > >> I tried installing the adapter from gems but I would get the > >> following error using that one: > >> > >> "invalid length of startup packet" or "end of file reached" > >> > >> > > > > Possibly try compiling the postgresql adapter from source? This is > > the route I took and has worked beautifully. I also compiled my own > > ruby rather than use darwinports. > > > > > > > >> Anyone ever come across this problem and find a solution to it? :-) > >> > > > > When all else fails, try the pure ruby postgres bindings: > > > > sudo gem install postgres-pr > > > > > > > >> > >> I really appreciate your feedback! > >> > >> Your Friend, > >> > >> John Kopanas > >> > >> > > > > > > Good luck! > > > > Jason > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > John Kopanas > http://www.thedatingguy.com - Online Dating the way it should be. > http://blog.thedatingguy.com > > >
I would suggest wiping ot you current ruby and gem installs and then install ruby, gems, rails, and then the postgres bindings again but compile them all from source this time. You can use this installer for OSX to install ruby with readline enabled, this one has worked great for me. Here is the url: http://homepage.mac.com/discord/Ruby/Ruby-1.8.2.dmg Having parts of ruby in darwin ports and part of it elsewhere is bound to cause problems and be nothing but a headache. If you install ruby with the installer I linked to and then rename the stock osx version of ruby to ruby.osx or something like that then you will avoid these issues. Then move on to installing gems from source and then all the gems you need. This way you will end up with a stable ruby system where every part of ruby and rails knows where to look for its other parts. Good luck- -Ezra On Jun 28, 2005, at 8:10 AM, John Kopanas wrote:> I thought I got it with your help but then I ran into another problem. > > I changed the shebang like you suggested but when I start up the > webrick I get an active_support not found. One problem leads to > another... any clue why I am getting this problem? > > I am also trying to install ruby from source using ./configure, > make, make test, make install. When I put that version in the > shebang and try to get webrick to startup I get a no such file to > load -- socket problem. > > I think what is happening is that I am using a mixture of gem and > ports and everything is pointing in the wrong direction. > > When I tried to install things the gem way I am getting an error of > "end of file reached". hmmm... not cool. > > Any suggestions on which way I should take and how I can get it to > work? > > I greatly appreciate this! > > > On 28-Jun-05, at 9:26 AM, Jason Foreman wrote: > > >> On 6/27/05, John Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote: >> >> >>> I installed ruby, postgres and rb-postgres like is mentioned here: >>> >>> http://wiki.rubyonrails.com/rails/show/ >>> HowtoInstallOnOSXTigerUsingDarwinPorts >>> >>> The only thing is that I did not use the -b switch when >>> installing rb- >>> postgres because I always got an error with -b option. >>> >>> But I am getting the following error when I try to go to any page: >>> >>> No such file to load -- postgres >>> >>> It seems like the adapter is not working properly. How can I get it >>> to work properly? >>> >>> >> >> Its not that it isn''t working, but that it isn''t found. This could >> indicate a few things. >> >> After you installed Ruby and Rails, did you edit the shebang of the >> rails scripts to point to the darwinports version of ruby? >> "#!/usr/local/bin/ruby" => "#!/opt/local/bin/ruby" >> >> Did you add /opt/local/bin/ruby to the start of your path? >> >> Check to make sure the extension installed at all. It should be >> somewhere like: >> /opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.1.0/postgres.bundle >> >> >> >> >>> >>> I tried installing the adapter from gems but I would get the >>> following error using that one: >>> >>> "invalid length of startup packet" or "end of file reached" >>> >>> >>> >> >> Possibly try compiling the postgresql adapter from source? This is >> the route I took and has worked beautifully. I also compiled my own >> ruby rather than use darwinports. >> >> >> >> >>> Anyone ever come across this problem and find a solution to it? :-) >>> >>> >> >> When all else fails, try the pure ruby postgres bindings: >> >> sudo gem install postgres-pr >> >> >> >> >>> >>> I really appreciate your feedback! >>> >>> Your Friend, >>> >>> John Kopanas >>> >>> >>> >> >> >> Good luck! >> >> Jason >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> > > > John Kopanas > http://www.thedatingguy.com - Online Dating the way it should be. > http://blog.thedatingguy.com > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
Wow... it finally worked. I owe you big time. Basically when I ran which everything was pointing to different places. Now everything is pointing to darwinports versions of stuff. Much better. So all I did in my profile was put /opt/local/bin before /usr/local/ bin and voila! Thank you very much one again!!!! On 28-Jun-05, at 11:30 AM, Jason Foreman wrote:> On 6/28/05, John Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote: > >> I thought I got it with your help but then I ran into another >> problem. >> >> I changed the shebang like you suggested but when I start up the >> webrick I get an active_support not found. One problem leads to >> another... any clue why I am getting this problem? >> >> > > It sounds like maybe your ''gem install rails'' happened in the standard > ruby, not the darwinports ruby. > > edit your ~/.profile and put in an "export PATH=/opt/local/bin:$PATH" > if you haven''t yet. Then exit the terminal and start it again. > > Both ''which ruby'' and ''which gem'' should point to /opt/local/bin now. > Then do a ''sudo gem install rails''. Then try running webrick again. > > > >> I am also trying to install ruby from source using ./configure, make, >> make test, make install. When I put that version in the shebang and >> try to get webrick to startup I get a no such file to load -- socket >> problem. >> >> I think what is happening is that I am using a mixture of gem and >> ports and everything is pointing in the wrong direction. >> >> > > This is certainly what is happening. You''ve got bits from > darwinports, hand compiled, and possibly even the default ones that > ship all fighting against each other. The ''gotcha'' for me was that > after compiling my own ruby, I had to set the path to point to it > (/usr/local/bin), then exit the current terminal and start a new one > before I compiled rubygems and installed the rest. > > > >> When I tried to install things the gem way I am getting an error of >> "end of file reached". hmmm... not cool. >> > > This might be because its using the standard ruby gems built against > the Apple shipped version of ruby. > > >> >> Any suggestions on which way I should take and how I can get it to >> work? >> >> > > Try the first suggestion about the path and reinstalling rails. If > that doesn''t work, I can walk you through doing a manual compile and > install of everything you should need. I compiled each piece myself, > and with the exception of one little hiccup in readline, it all > compiles very nicely. > > > >> I greatly appreciate this! >> >> >> > > NP! > > Jason > > > > > >> On 28-Jun-05, at 9:26 AM, Jason Foreman wrote: >> >> >>> On 6/27/05, John Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote: >>> >>> >>>> I installed ruby, postgres and rb-postgres like is mentioned here: >>>> >>>> http://wiki.rubyonrails.com/rails/show/ >>>> HowtoInstallOnOSXTigerUsingDarwinPorts >>>> >>>> The only thing is that I did not use the -b switch when installing >>>> rb- >>>> postgres because I always got an error with -b option. >>>> >>>> But I am getting the following error when I try to go to any page: >>>> >>>> No such file to load -- postgres >>>> >>>> It seems like the adapter is not working properly. How can I >>>> get it >>>> to work properly? >>>> >>>> >>> >>> Its not that it isn''t working, but that it isn''t found. This could >>> indicate a few things. >>> >>> After you installed Ruby and Rails, did you edit the shebang of the >>> rails scripts to point to the darwinports version of ruby? >>> "#!/usr/local/bin/ruby" => "#!/opt/local/bin/ruby" >>> >>> Did you add /opt/local/bin/ruby to the start of your path? >>> >>> Check to make sure the extension installed at all. It should be >>> somewhere like: >>> /opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.1.0/ >>> postgres.bundle >>> >>> >>> >>> >>>> >>>> I tried installing the adapter from gems but I would get the >>>> following error using that one: >>>> >>>> "invalid length of startup packet" or "end of file reached" >>>> >>>> >>>> >>> >>> Possibly try compiling the postgresql adapter from source? This is >>> the route I took and has worked beautifully. I also compiled my own >>> ruby rather than use darwinports. >>> >>> >>> >>> >>>> Anyone ever come across this problem and find a solution to it? :-) >>>> >>>> >>> >>> When all else fails, try the pure ruby postgres bindings: >>> >>> sudo gem install postgres-pr >>> >>> >>> >>> >>>> >>>> I really appreciate your feedback! >>>> >>>> Your Friend, >>>> >>>> John Kopanas >>>> >>>> >>>> >>> >>> >>> Good luck! >>> >>> Jason >>> _______________________________________________ >>> Rails mailing list >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >>> >> >> >> John Kopanas >> http://www.thedatingguy.com - Online Dating the way it should be. >> http://blog.thedatingguy.com >> >> >> >> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >John Kopanas http://www.thedatingguy.com - Online Dating the way it should be. http://blog.thedatingguy.com