Pregunta

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!

¿Fue útil?

Solución

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!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top