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!

有帮助吗?

解决方案

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!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top