* Ladislav Slezak <[email protected]> [Aug 14. 2009 15:40]:
> Hi all,
> 
> Karel (the RoR consultant) pointed out yesterday that it should be possible
> to enable reloading of plugins.
> 
> It's annoying to restart the rails server after each change and then relogin 
> again...
> 
> Google found some solutions but they didn't work for me, one of them works 
> after a
> small modification.

Cool, thanks !
> 
> So, how to achive the automatic reloading? Just put
> 
> --------------8<-------------
> # always reload all files in development mode
> if ENV['RAILS_ENV'] == 'development'
>     # get all subdirectories in app/
>     dirs = Dir[File.join(directory, 'app', '*')].reject{|x| not 
> File.directory?(x)}
> 
>     dirs.each do |dir|
>         $LOAD_PATH << dir
>         ActiveSupport::Dependencies.load_paths << dir
>         ActiveSupport::Dependencies.load_once_paths.delete(dir)
>     end
> end
> --------------8<-------------
> 
> into your 'init.rb' file in the plugin directory.

Can we put it into the 'global' init.rb of the rest-service ?


Klaus
---
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to