Wits end..."cross-thread violation on rb_gc()"

I had crazy issues getting the mysql gem working properly and after
hours of trying to get it run I decided to reinstall my whole Ruby /
Rails / Gems setup.

Previously had macports versions of everything installed, went the
compile it from source route this time.

Proceeded to build it all from source and now when I get my last Mysql
gem installe, to run a “rails projname” test, it spits out the
following.

*** OUTPUT
[BUG] cross-thread violation on rb_gc()
(null)

Abort trap
*** END OUTPUT

I read that this is due to that specific gem being compiled /built with
an old version of Ruby (Not really possible as I ONLY have the current
version installed… I think) but I tried fixing it anyway.

jb> cd /usr/local/lib/ruby/gems/1.8/gems

gems jb> ls -1 //.bundle|ruby -pe '$_.gsub! /-./, “”'|uniq

This command only shows the ‘mysql’ gem being out of date, any attempt
at reinstalling / even using the ‘arch’ settings has the same effect.

Here’s a “dump” of my environment: (Snow Leopard)

gems jb> gem env

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.5
  • RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
  • INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /usr/local/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/local/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-darwin-10
  • GEM PATHS:
    • /usr/local/lib/ruby/gems/1.8
    • /Users/jbateman/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

Willing to try anything even re-ripping ruby/rails etc out of my system
again.

Thanks.

Trying to revive this topic in the hope of getting some resolution to
this issue.

I would be willing to try anything at this point as my Rails environment
is utterly useless right now.

Note: It’s very possible with all the ‘fixes’ I"ve tried that the system
is just in a weird state so I’d even be willing to WIPE EVERYTHING
related to ruby / rails on my MAC but I"m not sure how to do this and
guarantee nothing is left over.

(Still new to the *nix side of the MAC OS).

Thanks.

Jean N. wrote:

I had crazy issues getting the mysql gem working properly and after
hours of trying to get it run I decided to reinstall my whole Ruby /
Rails / Gems setup.

Previously had macports versions of everything installed, went the
compile it from source route this time.

Proceeded to build it all from source and now when I get my last Mysql
gem installe, to run a “rails projname” test, it spits out the
following.

*** OUTPUT
[BUG] cross-thread violation on rb_gc()
(null)

Abort trap
*** END OUTPUT

I read that this is due to that specific gem being compiled /built with
an old version of Ruby (Not really possible as I ONLY have the current
version installed… I think) but I tried fixing it anyway.

jb> cd /usr/local/lib/ruby/gems/1.8/gems

gems jb> ls -1 //.bundle|ruby -pe '$_.gsub! /-./, “”'|uniq

This command only shows the ‘mysql’ gem being out of date, any attempt
at reinstalling / even using the ‘arch’ settings has the same effect.

Here’s a “dump” of my environment: (Snow Leopard)

gems jb> gem env

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.5
  • RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
  • INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /usr/local/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/local/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-darwin-10
  • GEM PATHS:
    • /usr/local/lib/ruby/gems/1.8
    • /Users/jbateman/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

Willing to try anything even re-ripping ruby/rails etc out of my system
again.

Thanks.

“Reset” my system by reinstalling the OS (Was the only way I could
guarantee I got everything put back in), did the sytem update and also
installed/upgraded XCods to resolve some ‘make’ issues caused by the OS
reinstall.

Ruby and Rails (2.3.x) is working up to the point I try and migrate a DB
Configured to use MYSQL.

Figured at this point I have nothing left to lose, upgraded to Rails 3
‘pre’ and didn’t fix the issue.

Going to try and most to postgreSql; if this doesn’t fix my issue I’m
borderline canning Ruby / Rails for use on my projects.

It’s a shame because the only reason for this decision, would be lack of
being able to solve an issue, that should it occur on my prod systems,
would have had my sites at a standstill.

Hoping the DB switch fixes the problem.

Jean N. wrote:

Trying to revive this topic in the hope of getting some resolution to
this issue.

I would be willing to try anything at this point as my Rails environment
is utterly useless right now.

Note: It’s very possible with all the ‘fixes’ I"ve tried that the system
is just in a weird state so I’d even be willing to WIPE EVERYTHING
related to ruby / rails on my MAC but I"m not sure how to do this and
guarantee nothing is left over.

(Still new to the *nix side of the MAC OS).

Thanks.

Jean N. wrote: