[Rails] Re: How to dynamically load plugin files on every request?

2009-07-04 Thread Älphä Blüë
Gavin Morrice wrote: > Hi - Why not develop the plugin in your app's /lib directory first? > > Once you're happy with how it works, you can transfer it over to the > plugin's /lib directory > > That way you don't have to restart the server or change your apps > configuration options > > Gavin >

[Rails] Re: How to dynamically load plugin files on every request?

2009-07-04 Thread Gavin
Hi - Why not develop the plugin in your app's /lib directory first? Once you're happy with how it works, you can transfer it over to the plugin's /lib directory That way you don't have to restart the server or change your apps configuration options Gavin http://handyrailstips.com/ On Jul 3, 7

[Rails] Re: How to dynamically load plugin files on every request?

2009-07-03 Thread Simon Macneall
Your welcome. The differences probably mean we are using different versions of Rails. Cheers Simon On Sat, 04 Jul 2009 14:52:28 +0800, Vikrant wrote: > > Thanks Simon Macneall, > It worked!! > I hope you mean ActiveSupport::Dependencies by Dependencies otherwise > I get an error `const_missin

[Rails] Re: How to dynamically load plugin files on every request?

2009-07-03 Thread Vikrant
Thanks Simon Macneall, It worked!! I hope you mean ActiveSupport::Dependencies by Dependencies otherwise I get an error `const_missing':NameError: uninitialized constant Rails::Initializer::Dependencies. I first tried only to write ActiveSupport::Dependencies.load_once_paths.delete RAILS_ROOT + '

[Rails] Re: How to dynamically load plugin files on every request?

2009-07-03 Thread Simon Macneall
I have this in my development.rb file, which I set up when I was making some changes to a thirdparty plugin and got sick of the constant restarting. # this forces the Ezgraphix plugin to be reloaded each time - to facilitate 'fixing' and updating it Dependencies.explicitly_unloadable_const

[Rails] Re: How to dynamically load plugin files on every request?

2009-07-03 Thread Vikrant
No, you didn't understand. What I'm telling is, while I'm coding in "development" mode, if I change something in "app/controllers/application_controller.rb", changes appear instantly. But if I change something in "vendor/plugins/ my_plugin/lib/example.rb", I need to restart the server for changes

[Rails] Re: How to dynamically load plugin files on every request?

2009-07-03 Thread Älphä Blüë
Vikrant wrote: > Hi, > I have been developing a Rails plugin recently, and I have realised > that for every change I make into files of my plugin, I have to > restart the server to make changes take effect. While changes at > application's own file appear instantly. > I'm writing only after I sea