# Threadsafe! & engines

**URL:** <https://www.ruby-forum.com/t/threadsafe-engines/172898>\
**Category:** Rails\
**Created:** [July 29, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/threadsafe-engines/172898 "2009-07-29T16:46:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@Tyler\_J](https://www.ruby-forum.com/u/Tyler_J)\
**Post date:** [July 29, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/threadsafe-engines/172898/1 "2009-07-29T16:46:58Z")

</div>

I’m having a problem with rails 2.3.2, engines, and eager loading.  
There is a default set of eager\_load\_paths (the usual suspects under  
app/) that will be greedily required by rails at boot time when you’re  
running with threadsafe! on, and of course you can append your own  
custom paths. However, so far as I can tell, engines are never  
eagerly loaded and therefore unavailable when the system is running in  
threadsafe! mode.

First, I’d like to know if I’m missing something. I looked through  
the plugin loader, found the code that loads the engines, and could  
not discover how, if at all, it attempts to eager load them. I also  
explored the rails initializer in railties, found the eager loading  
code, and didn’t see anything related to plugins there.

So far as workarounds go it appears subclassing the plugin loader is  
the best option. If there is a better approach, I’m interested.

Your help is greatly appreciated,

-Tyler J.

---

<div class="post-metadata">

**Author:** ![Tyler\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@Tyler\_J](https://www.ruby-forum.com/u/Tyler_J)\
**Post date:** [August 3, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/threadsafe-engines/172898/2 "2009-08-03T14:55:58Z")

</div>

Tyler J. wrote:

> I’m having a problem with rails 2.3.2, engines, and eager loading.  
> There is a default set of eager\_load\_paths (the usual suspects under  
> app/) that will be greedily required by rails at boot time when you’re  
> running with threadsafe! on, and of course you can append your own  
> custom paths. However, so far as I can tell, engines are never  
> eagerly loaded and therefore unavailable when the system is running in  
> threadsafe! mode.

> Your help is greatly appreciated,

Ping core about it?  
=r

---

<div class="post-metadata">

**Author:** ![Tyler\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@Tyler\_J](https://www.ruby-forum.com/u/Tyler_J)\
**Post date:** [August 3, 2009, 9:42pm UTC](https://www.ruby-forum.com/t/threadsafe-engines/172898/3 "2009-08-03T21:42:15Z")

</div>

Pinged core, it’s a bug.

On Mon, Aug 3, 2009 at 7:55 AM, Roger
