-
Notifications
You must be signed in to change notification settings - Fork 101
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
--ruby-out does not invoke protoc-gen-ruby for protoc v3 #341
Comments
I haven attempted to replicate these steps, using the current 3.6.12 release, and all I get is an immediate Exception, from the Gem::Specification layer:
Would really like some direction on where/what to try next, as I'm stuck in a situation where I must have |
@brianvh I ended up creating a new binstub that looks like this: https://gist.github.com/ebenoist/e72e3172fcdd22897ada7468e3262080 from a patch of the gem I created like this: And then I invoke the proto 3 compiler like so: protoc -I schemas/ --plugin=./bin/protoc-gen-ruby2 --ruby2_out=./out/ def/foo.proto Works well enough for me until the remaining issues with proto3's official ruby gem are worked out. |
@ebenoist Thanks for the pointers. Unfortunately, your solution isn't working for me. I've tried multiple combinations of trying to match what you've done, but I'm getting hung up on this line in your custom binstub: load Gem.bin_path("protobuf", "protoc-gen-ruby2") When trying to execute on that, I'm being told:
If I try to go all the way to using your From all the pieces I've been trying to put together, it looks like there are two |
@brianvh you'll need to make sure both of those binstubs are in your $PATH
|
This was resolved by #382, and released in v3.8.2. |
@liveh2o awesome! Thanks! |
Hi Friends-
With the protobuf v3 out, the official google compiler invokes its internal ruby compiler for v3 protof files with the
--ruby_out
option instead of protoc-gen-ruby. I'm not ready to switch to v3 yet (or Google's compiler) and would love to continue using this project.I can force this to work by renaming the flag to
--ruby2_out
for example and by changing the name of the binary toprotoc-gen-ruby2
this works fantastically even with the newest compiler. Any thoughts on how both of these compilers can continue to live together. This project is invaluable because of its proto2 support.If there's consensus around an approach, I'd be happy to put up a PR.
The text was updated successfully, but these errors were encountered: