Can't get console to work in rails

Hi, i can't get the console to work in rails
. everything else seems to work fine. I think this happened after i
updated to the most recent version of rails or maybe it has to do with
postgres (which I'm also very new to as I usually use mysql)

This is the error I get:

~/web_sites/new_early$ruby script/console
Loading development environment (Rails 2.2.2)
/usr/local/lib/ruby/gems/1.8/gems/postgres-0.7.9.2008.01.28/lib/postgres.bundle:
[BUG] Bus Error
ruby 1.8.4 (2005-12-24) [i686-darwin8.8.3]

Abort trap

any ideas?
regards
caspar

Try installing the "pg" gem instead. I've had more luck with it than
the older postgres gem.

Whoever's been maintaining the postgres gems, I think them for their
work, but keeping track of what gem you're supposed to use has been
confusing (at least for me).

Jeff
purpleworkshops.com

Yes, a second to that. I was doing a clean install of a full stack into a VM the other day with the intent of getting a little more familiar with Postgres, and it must me about 45 minutes to sort out which gem was the right one to use. Went with pg in the end, and it seems to have worked out fine, but your mileage may vary as you are still using Ruby 1.8.4.

Would be cool if someone directly involved with either one of these gems’ maintenance could slap together a blog post about which gem to use in which situation and post the link to this list and all the other usual locations. I’m sure I’m we’re not the only ones who have this question.

Hi , thanks for the help. I uninstaled the postgres gem and installed
the pg gem but still have the same error:

~/web_sites/new_early$ruby script/console
Loading development environment (Rails 2.2.2)
/usr/local/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.bundle: [BUG] Bus
Error
ruby 1.8.4 (2005-12-24) [i686-darwin8.8.3]

Abort trap

any other ideas?

really struggling without the console.

regards
caspar

Fernando Perez wrote:

ruby 1.8.4 (2005-12-24) [i686-darwin8.8.3]

Well your Ruby version is like 3.5 years old. Time to update?

updating with macports as we speak....

Okay in the end macports was more trouble than good but installed ruby
1.8.7 from source now console works fine. Thanks for all the help.
regards
c

Why more trouble? Usually macports is cool. However for Ruby I find it
easier to compile it manually.

Fernando Perez wrote:

Okay in the end macports was more trouble than good but installed ruby
1.8.7 from source now console works fine. Thanks for all the help.
regards
c

Why more trouble? Usually macports is cool. However for Ruby I find it
easier to compile it manually.

Macports was trouble because I already had everything installed, rails,
gems , lighttpd etc. elsewhere and I was getting lots of grief from
messed up PATH. However it did look very useful and next time I do a
clean install I'm going to have another crack at using it.