Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
garyharan opened this issue Jun 9, 2011 · 5 comments

Comments

@garyharan
Copy link

$ 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.

@codekitchen
Copy link
Contributor

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

@garyharan
Copy link
Author

doh! my bad! Thanks for the quick response!

@codekitchen
Copy link
Contributor

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

@codekitchen codekitchen reopened this Jun 9, 2011
@garyharan
Copy link
Author

Noticed similar error when proto file is empty.

jwroblewski pushed a commit to liquidm/ruby-protocol-buffers that referenced this issue Jun 2, 2013
If a non-binary string is passed in, Message#parse wraps it in a
StringIO and sets the encoding to binary. But if a IO object is passed
in, #parse uses it as-is, and was potentially reading multi-byte chars
instead of raw bytes because of the getc usage.

fixes mozy#6
kb pushed a commit to crashlytics/ruby-protocol-buffers that referenced this issue Jun 25, 2013
If a non-binary string is passed in, Message#parse wraps it in a
StringIO and sets the encoding to binary. But if a IO object is passed
in, #parse uses it as-is, and was potentially reading multi-byte chars
instead of raw bytes because of the getc usage.

fixes mozy#6
kb pushed a commit to crashlytics/ruby-protocol-buffers that referenced this issue Jun 25, 2013
If a non-binary string is passed in, Message#parse wraps it in a
StringIO and sets the encoding to binary. But if a IO object is passed
in, #parse uses it as-is, and was potentially reading multi-byte chars
instead of raw bytes because of the getc usage.

fixes mozy#6
jwroblewski pushed a commit to liquidm/ruby-protocol-buffers that referenced this issue Jan 11, 2014
@litch
Copy link

litch commented Jun 6, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants