Please try the following patch to ruby-lsapi-2.2, open file ext/lsapi/lsruby.c, in function:
static VALUE lsapi_reopen( int argc, VALUE *argv, VALUE self)
replace:
return rb_io_reopen( argc, argv, orig_stderr );
with
return rb_funcall( orig_stderr, rb_intern( "reopen" ), 2...