# Wits end..."cross-thread violation on rb\_gc()"

**URL:** <https://www.ruby-forum.com/t/wits-end-cross-thread-violation-on-rb-gc/184173>\
**Category:** Rails\
**Created:** [February 26, 2010, 3:33am UTC](https://www.ruby-forum.com/t/wits-end-cross-thread-violation-on-rb-gc/184173 "2010-02-26T03:33:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeannibee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Post date:** [February 26, 2010, 3:33am UTC](https://www.ruby-forum.com/t/wits-end-cross-thread-violation-on-rb-gc/184173/1 "2010-02-26T03:33:53Z")

</div>

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:
  - [http://gems.rubyforge.org/](http://gems.rubyforge.org/)

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

Thanks.

---

<div class="post-metadata">

**Author:** ![jeannibee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Post date:** [March 7, 2010, 2:25pm UTC](https://www.ruby-forum.com/t/wits-end-cross-thread-violation-on-rb-gc/184173/2 "2010-03-07T14:25:34Z")

</div>

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:
> - [http://gems.rubyforge.org/](http://gems.rubyforge.org/)
> 
> Willing to try anything even re-ripping ruby/rails etc out of my system  
> again.
> 
> Thanks.

---

<div class="post-metadata">

**Author:** ![jeannibee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Post date:** [March 8, 2010, 4:42pm UTC](https://www.ruby-forum.com/t/wits-end-cross-thread-violation-on-rb-gc/184173/3 "2010-03-08T16:42:56Z")

</div>

“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:
