Skip to content

gapic-generator-cloud docker invocation fails if --ruby-cloud-gem-name option is not supplied #323

Description

@viacheslav-rostovtsev

when invoking gapic-generator-cloud docker like this:

$ docker run --rm --user $UID \
  --mount type=bind,source=`pwd`/google/showcase/v1beta1,destination=/in/google/showcase/v1beta1,readonly \
  --mount type=bind,source=`pwd`/showcase-ruby,destination=/out \
  gcr.io/gapic-images/gapic-generator-ruby:latest

the generator will fail with the Nil reference exception.

/usr/local/bundle/gems/gapic-generator-0.0.1/templates/default/helpers/presenters/gem_presenter.rb:62 \  
 :in `namespace': undefined method `split' for nil:NilClass (ActionView::Template::Error)

This can be remedied by supplying the docker generator with the --ruby-cloud-gem-name parameter:

$ docker run --rm --user $UID \
  --mount type=bind,source=`pwd`/google/showcase/v1beta1,destination=/in/google/showcase/v1beta1,readonly \
  --mount type=bind,source=`pwd`/showcase-ruby,destination=/out \
  gcr.io/gapic-images/gapic-generator-ruby:latest --ruby-cloud-gem-name=showcase

(this generates correctly)

There should be a sensible default for the gemname we can add to the gapic-generator-ruby to avoid this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions