tag:blogger.com,1999:blog-3958627136570980537.post8056230174959019456..comments2023-05-06T04:53:36.229-07:00Comments on blog.PaplooTheLearned.net: Tip: Compiling the Postgres Gem for Ruby 1.9.1Paploohttp://www.blogger.com/profile/05918964938891806436noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-3958627136570980537.post-79691350002586402132022-09-30T04:49:44.481-07:002022-09-30T04:49:44.481-07:00Thhis is a great blogThhis is a great blogBird Control Marylandhttps://www.birdcontrolremoval.com/us/bird-control-maryland/noreply@blogger.comtag:blogger.com,1999:blog-3958627136570980537.post-11389521669169427252010-07-22T15:17:23.802-07:002010-07-22T15:17:23.802-07:00i tried ruby-pg and i applied the explanation abov...i tried ruby-pg and i applied the explanation above and works fine.<br /><br />thanksdafevarahttps://www.blogger.com/profile/13361054365360990305noreply@blogger.comtag:blogger.com,1999:blog-3958627136570980537.post-18819431691938346572010-05-11T10:12:03.281-07:002010-05-11T10:12:03.281-07:00@val2many: Yeah, I figured that out after getting ...@val2many: Yeah, I figured that out after getting a bug report reply from the pg team. I edited the the post about 6 months ago with a note at the top bout that. :)Paploohttps://www.blogger.com/profile/05918964938891806436noreply@blogger.comtag:blogger.com,1999:blog-3958627136570980537.post-15365997407570418492010-05-11T00:09:53.229-07:002010-05-11T00:09:53.229-07:00"gem install pg" works for me on Debian ..."gem install pg" works for me on Debian with no trouble at all.<br />You probably figured, but I thought I'd mention ...val2manyhttps://www.blogger.com/profile/15164564602871042864noreply@blogger.comtag:blogger.com,1999:blog-3958627136570980537.post-73531950422920155922010-02-04T18:35:11.813-08:002010-02-04T18:35:11.813-08:00@Anonymous on February 4, 2010 6:18 PM:
It sounds...@Anonymous on February 4, 2010 6:18 PM:<br /><br />It sounds like you have a conflict going on. You may want to remove all instances of the previous postgres gem and see if that makes pg work. (I'd advise switching to it if you can!)<br /><br />If it is still overriding, it is also possible that there is an installation of a postgres gem in an odd place that is overriding yours. (This sounds odd, but I've seen this happen on non-standard installs).Paploohttps://www.blogger.com/profile/05918964938891806436noreply@blogger.comtag:blogger.com,1999:blog-3958627136570980537.post-91217429856023660942010-02-04T18:18:32.094-08:002010-02-04T18:18:32.094-08:00Amazingly enough (or not?) I was doing a fresh ins...Amazingly enough (or not?) I was doing a fresh install with pg and was still getting the error.<br /><br />Well, I should say that installing pg worked fine, but when trying to start rails I kept getting a pg does not exist error. But both pg and postgres show the exact same gem when installed. Paths are set correctly, etc.<br /><br />So I ran your patch and now my server boots fine. Go figure!<br /><br />Either way, thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3958627136570980537.post-30780210749948547272009-09-24T12:55:06.575-07:002009-09-24T12:55:06.575-07:00You can use 'sed -i' to edit a file in pla...You can use 'sed -i' to edit a file in place. No need to type the filename twice.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3958627136570980537.post-66099719067647639282009-08-28T07:52:21.937-07:002009-08-28T07:52:21.937-07:00In response to lobo:
All you need to do to get th...In response to lobo:<br /><br />All you need to do to get this running on Ubuntu 9.04 is direct the sed commands to temporary files and then move them over the originals. <br /><br />$ cd /usr/local/lib/ruby/gems/1.9.1/gems/postgres-0.7.9.2008.01.28/ext<br />$ sudo sed "s/PLATFORM/RUBY_PLATFORM/" extconf.rb > ./extconf.bck<br />$ sudo mv extconf.bck extconf.rb<br />$ sudo ruby extconf.rb<br />$ sudo sed "s/RARRAY(\([_a-zA-Z0-9]*\))->ptr/RARRAY_PTR(\1)/; s/RARRAY(\([_a-zA-Z0-9]*\))->len/RARRAY_LEN(\1)/; s/row->len/RARRAY_LEN(row)/; s/row->ptr/RARRAY_PTR(row)/" postgres.c > ./postgres.bck<br />$ sudo mv postgres.bck postgres.c<br />$ sudo make<br />$ sudo make install<br /><br />Thanks for advice on how to get this working Paploo, very handy.Molthttps://www.blogger.com/profile/10224460206314827394noreply@blogger.comtag:blogger.com,1999:blog-3958627136570980537.post-63729463238408938122009-07-26T16:39:14.751-07:002009-07-26T16:39:14.751-07:00I had to chmod my extconf.rb file so I can write i...I had to chmod my extconf.rb file so I can write in it (sudo wouldn't cut it).<br /><br />After that, the first sed command, truncates the file to 0 bytes.<br /><br />I'm on Ubuntu 9.04, do you know what's going on?lobo_tuertohttp://blog.lobotuerto.comnoreply@blogger.com