Closed kapso closed 5 years ago
Hey there! Google ships their own protobuf compiler for ruby in v3 (the code you pasted is from their gem). This gem will still work though. Check out the rake task helpers that ship with this gem. They should set the protoc calls up for you automatically using the correct output plugin. The underlying problem is that the ruby output plugin in protobuf v3 can not longer be overridden so we need to use a different output plugin name. Take a look at the code here: https://github.com/ruby-protobuf/protobuf/blob/master/lib/protobuf/tasks/compile.rake
If that works for you feel free to close this issue. Thanks!
@film42 that worked, thanks for the quick response.
My first attempt at protobuf and I am using this example - https://github.com/ruby-protobuf/protobuf/wiki/Compiling-Definitions
And I noticed that in my case the output is not
/foo/user.proto
but/foo/user_pb.rb
, and as you can see the code is totally different as well.Also, I am getting -
LoadError (cannot load such file -- google/protobuf)
. Anything I am doing wrong, or just the wiki is really old?Versions -