This project is archived and is in readonly mode.

#1524 ✓resolved
Matt Jones

Gem plugins, autoloading, and dev mode reloading

Reported by Matt Jones | December 7th, 2008 @ 06:24 PM | in 3.0.2

I'm not sure if this is really a bug, but I'm documenting it so that others that run across it won't be confused...

For a gem plugin, there is a difference between using config.gem in the environment file and manually including the gem in an intializer (with gem 'name' / require 'name'). In the latter case, anything that's autoloaded from the gem is reloaded on each request. This is unexpected, as using config.gem doesn't exhibit this behavior.

I encountered this bug when a gem plugin that monkey-patched ActionController was failing on the second request in dev mode with a "Stack too deep" error.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages