# Reloading .rb files / reparsing?

**URL:** <https://rubytalk.org/t/reloading-rb-files-reparsing/35048>\
**Category:** ruby-talk\
**Created:** [3 February 2007 16:30 UTC](https://rubytalk.org/t/reloading-rb-files-reparsing/35048 "2007-02-03T16:30:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Collier](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@David\_Collier](https://rubytalk.org/u/David_Collier)\
**Post date:** [3 February 2007 16:30 UTC](https://rubytalk.org/t/reloading-rb-files-reparsing/35048/1 "2007-02-03T16:30:52Z")

</div>

hi -

I'm working on an app which is using webbrick for its mini web-server.

each time i change the source i have to restart my app;  
is there a way to get ruby to re-parse the files without this?  
effectively the same as if just reloading the page if it were PHP...

i guess rails does this - "not caching" the files while in dev mode.

tx!

/dc

> **···**
>
> -------------------------------------------  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;David "DC" Collier  
> [mailto:dc@pikkle.com](mailto:dc@pikkle.com)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+81 (0)80 6521 9559  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skype: callto://d3ntaku  
> -------------------------------------------  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pikkle 株式会社  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[http://www.pikkle.com](http://www.pikkle.com)  
> -------------------------------------------

---

<div class="post-metadata">

**Author:** ![Chris\_Carter](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@Chris\_Carter](https://rubytalk.org/u/Chris_Carter)\
**Post date:** [3 February 2007 16:35 UTC](https://rubytalk.org/t/reloading-rb-files-reparsing/35048/2 "2007-02-03T16:35:58Z")

</div>

Hi David,  
You could try hacking the Camping Reloader to do your business:  
[http://code.whytheluckystiff.net/camping/browser/trunk/lib/camping/reloader.rb](http://code.whytheluckystiff.net/camping/browser/trunk/lib/camping/reloader.rb)  
[http://code.whytheluckystiff.net/camping/browser/trunk/bin/camping](http://code.whytheluckystiff.net/camping/browser/trunk/bin/camping)  
(this uses it)

> **···**
>
> On 2/3/07, dc \<lister@pikkle.com\> wrote:
> 
> > hi -
> > 
> > I'm working on an app which is using webbrick for its mini web-server.
> > 
> > each time i change the source i have to restart my app;  
> > is there a way to get ruby to re-parse the files without this?  
> > effectively the same as if just reloading the page if it were PHP...
> > 
> > i guess rails does this - "not caching" the files while in dev mode.
> > 
> > tx!
> > 
> > /dc  
> > -------------------------------------------  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;David "DC" Collier  
> > [mailto:dc@pikkle](mailto:dc@pikkle).com  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+81 (0)80 6521 9559  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skype: callto://d3ntaku  
> > -------------------------------------------  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pikkle 株式会社  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[http://www.pikkle.com](http://www.pikkle.com)  
> > -------------------------------------------
> 
> --  
> Chris Carter  
> concentrationstudios.com  
> brynmawrcs.com
