[Rails] Re: Run Rake from Controller/View?!

2009-09-29 Thread Ingmar Hamer
> Is rake a batch file in windows? That could explain this, I believe a > batch file cannot just be run, it needs a command shell to do it. > Whether it might explain other problems I do not know. > > Colin That sounds reasonable. As a matter of fact there are two rake-files in my ruby/bin dir

[Rails] Re: Run Rake from Controller/View?!

2009-09-29 Thread Ingmar Hamer
> > I don't know if you are. Are you sure the task isn't being run? Does > it work from the Rails console? > Yes, the task runs fine from the rails console and No, it doesn't get executed when I run the "test_rake"-function (the view renders in like half a second, I don't have any output o

[Rails] Re: Run Rake from Controller/View?!

2009-09-29 Thread Ingmar Hamer
Finally got it to run using the "system call"-approach: The trick to get it to run on my windows machine was using the "start" command (that usually spawns a procell in a new shell). Why windows executes the "dir" command without "start" but not the rake command is beyond me, but at least now

[Rails] Re: Run Rake from Controller/View?!

2009-09-29 Thread Ingmar Hamer
Marnen Laibow-Koser wrote: >> , where >> Rake::Task#execute is documented. Next time, you may want to take those >> 20 seconds before posting... >> Well, thanks for the reply. After feeling incredibly stupid for a couple of minutes I tried using the methods given in the docs you linked to.

[Rails] Re: Run Rake from Controller/View?!

2009-09-28 Thread Ingmar Hamer
Leonardo Mateo wrote: > Just a guess, since I haven't ever had this situation but, rake files > are ruby files, you should be able to include them from any other ruby > file and execute the methods it has defined inside. > As I said, I haven't tried this, is just a guess. > > Otherwise, you can

[Rails] Re: Reload Everything (lib/plugins/vendor/the lot)

2008-09-09 Thread Ingmar
o some of Rails' modules and classes like for example ActiveRecord, you might be out of luck. As far as I understand it, these are generally not being reloaded although there may still be some tricks I don't know of. On Sep 9, 1:20 am, Alex Moore <[EMAIL PROTECTED]> wrote: > Ingmar:

[Rails] Re: Reload Everything (lib/plugins/vendor/the lot)

2008-09-08 Thread Ingmar
I ran into the same problem; turned out that I also had to add the module which contains my plugin's classes to ActiveSupport::Dependencies.explicitly_unloadable_constants So if you have your plugin structured like this init.rb lib/myplugin.rb lib/myplugin/*.rb you should add the following line