Question

I'm running into a strange error... After I call a thrift method, all file IO I try to do fails with errors like:

log writing failed. undefined method `write_struct_begin' 

This occurs if I try to do logger.info etc., or even if I just open a file directly, and try to write to it.

Totally stumped!

Était-ce utile?

La solution

The problem was that the Thrift interface I was consuming defined a type called "File". As soon as I pulled in the generated Ruby code for this file it rewrote the built-in File class. It would be nice if ruby's thrift generator namespaced things better!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top