# Console ThreadError ("thread ... tried to join itself")

**URL:** <https://www.ruby-forum.com/t/console-threaderror-thread-tried-to-join-itself/188325>\
**Category:** Rails\
**Created:** [May 10, 2010, 10:56am UTC](https://www.ruby-forum.com/t/console-threaderror-thread-tried-to-join-itself/188325 "2010-05-10T10:56:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@mattn](https://www.ruby-forum.com/u/mattn)\
**Post date:** [May 10, 2010, 10:56am UTC](https://www.ruby-forum.com/t/console-threaderror-thread-tried-to-join-itself/188325/1 "2010-05-10T10:56:01Z")

</div>

I’m just getting started with Rails 2 and I’ve immediately hit a  
problem in the console. This must be well known so perhaps someone  
could just tell me the solution.

mattleopard$ script/console  
Loading development environment (Rails 2.3.5)

> > app.get “photos”  
> > =\> 200
> 
> > app.get “photos”  
> > ThreadError: thread 0x1003c7368 tried to join itself  
> > from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/  
> > action\_controller/reloader.rb:31:in `lock' from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/ action_controller/reloader.rb:31:in`run’  
> > from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/  
> > action\_controller/dispatcher.rb:108:in `call' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lint.rb:47:in`\_call’  
> > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/  
> > ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lint.rb:35:in `call' from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/ action_controller/integration.rb:316:in`process’  
> > from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/  
> > action\_controller/integration.rb:197:in `get’  
> > from (irb):2
> 
> >

As you can see, the _second_ app.get command in the console always  
throws this error. This is on Snow Leopard. My gems are all up to  
date, but perhaps there’s some gem that I need to reinstall  
completely? Thx - m.

---

<div class="post-metadata">

**Author:** ![mattn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@mattn](https://www.ruby-forum.com/u/mattn)\
**Post date:** [May 28, 2010, 2:22pm UTC](https://www.ruby-forum.com/t/console-threaderror-thread-tried-to-join-itself/188325/2 "2010-05-28T14:22:34Z")

</div>

m. this is not a snow leopard issue, try running “script/console  
production” and it will work. Because you need to have  
config.cache\_classes set to true in the environment, and development  
you probably want to that turned off.

/Pontus

---

<div class="post-metadata">

**Author:** ![mattn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@mattn](https://www.ruby-forum.com/u/mattn)\
**Post date:** [May 28, 2010, 4:07pm UTC](https://www.ruby-forum.com/t/console-threaderror-thread-tried-to-join-itself/188325/3 "2010-05-28T16:07:21Z")

</div>

pfs [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> m. this is not a snow leopard issue, try running “script/console  
> production” and it will work. Because you need to have  
> config.cache\_classes set to true in the environment, and development  
> you probably want to that turned off.

Take a look at this. Seems like it is fixed in latest release:

[https://rails.lighthouseapp.com/projects/8994/tickets/4565](https://rails.lighthouseapp.com/projects/8994/tickets/4565)

Jarl
