Mailinglist Archive: yast-devel (246 mails)

< Previous Next >
Re: [yast-devel] WebYaST - automatic plugin reloading!
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Mon, 17 Aug 2009 13:37:17 +0200
  • Message-id: <20090817113717.GE29397@xxxxxxxxxxxxx>
* Ladislav Slezak <lslezak@xxxxxxx> [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

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

# 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}

dirs.each do |dir|
$LOAD_PATH << dir
ActiveSupport::Dependencies.load_paths << dir

into your 'init.rb' file in the plugin directory.

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

SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N├╝rnberg)

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups