# Dynamic ruby code via load() method / Mongrel Caching

**URL:** <https://www.ruby-forum.com/t/dynamic-ruby-code-via-load-method-mongrel-caching/111498>\
**Category:** Rails\
**Created:** [August 7, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/dynamic-ruby-code-via-load-method-mongrel-caching/111498 "2007-08-07T23:42:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 7, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/dynamic-ruby-code-via-load-method-mongrel-caching/111498/1 "2007-08-07T23:42:13Z")

</div>

Hi,

my RoR application should load some ruby code which is dynamic created  
outside of the RoR application. In a RoR helper Iuse the ruby “load”  
Method. On my development environment anything works fine but when I  
run the app on production the ruby source file isn’t loaded again - a  
cached copy is used.

When I start/stop mongrel the file is new loaded.

Where is my mistake here?

Thanks in advance  
frank

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 8, 2007, 7:37am UTC](https://www.ruby-forum.com/t/dynamic-ruby-code-via-load-method-mongrel-caching/111498/2 "2007-08-08T07:37:50Z")

</div>

Hi Frank,

just a guess though, but try to remove it from $:

Regards  
Florian
