mozy/ruby-protocol-buffers

better error message if protoc is not installed, or errors from protoc

garyharan opened this issue · 5 comments

$ gem install ruby-protocol-buffers
$ ruby-protoc featureful.proto
HOME_PATH/.rvm/gems/ruby-1.8.7-p334/gems/ruby-protocol-buffers-1.0.1/lib/protocol_buffers/compiler.rb:16:in compile': 127 (ProtocolBuffers::CompileError) from HOME_PATH/.rvm/gems/ruby-1.8.7-p334/gems/ruby-protocol-buffers-1.0.1/bin/ruby-protoc:38 from HOME_PATH/.rvm/gems/ruby-1.8.7-p334/bin/ruby-protoc:19:inload'
from HOME_PATH/.rvm/gems/ruby-1.8.7-p334/bin/ruby-protoc:19

The featureful.proto file is taken straight from the current source code.

what is the output of protoc --version ? You need a recent version of google's protoc installed to compile .proto files.

doh! my bad! Thanks for the quick response!

well this really needs a better error message. i'm re-opening this ticket to remind me.

Noticed similar error when proto file is empty.

I totally just bumped into the same issue and thought about making a PR for it...