[Backgroundrb-devel] Is there a way to make backgroundrb 0.2.1 fail silently on win32?

Aleksandr Levchuk alevchuk at gmail.com
Fri Dec 15 15:52:05 EST 2006

If one has all the calls to BackgrounDRb isolated in a few Rails
models. For example I have app/model/nucleus.rb - which does all the
interactions with workers. One could solve such a  problem by using
Rails mock objects. I would just have to place a mocking model into
app/test/mocks/development/nucleus.rb, and it will use that model
instead when the application is running in the development

For your case, the developers could run Rails with
--environment=development on win32. On linux you could be run it with
--environment=testing or --environment=production, so that
BackgrounDRb is used.

Question for Ezra: Will BackgrounDRb work on Windows eventually?

On 12/14/06, Eden Li <eden.li at gmail.com> wrote:
> After upgrading to backgroundrb 0.2.x, Rails barfs lstat errors left and
> right when using the console or webrick or mongrel on win32.  We run our
> site on a Linux server, so I'm not trying to get backgroundrb to work on a
> win32 machine.  I just want to quietly stop loading itself if it detects
> that it's on a win32 machine so that the rest of Rails can continue to load.
> Most of our developers are working on win32 machines and they're focused on
> other parts of our site, so it would be nice for them to be able to continue
> working on their bits of code even though backgroundrb is sitting dormant in
> the vendor/plugins directory.
> I tried searching for a way to disable certain plugins in
> config/environment.rb, but it appears this idea was batted down by DHH:
> http://dev.rubyonrails.org/ticket/5468
> Is there something I can do to monkey patch my svn:externals'd link to
> backgroundrb 0.2.1 to prevent it from loading itself if PLATFORM =~
> /win32/i?
> I could unlink backgroundrb from the devjavu svn repository and do the patch
> myself on the code, but I'd prefer not to store backgroundrb in my own SVN
> repo.
> Any ideas?
> Thanks in advance,
> eden
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel

Aleksandr Levchuk
University of California, Riverside

More information about the Backgroundrb-devel mailing list