Skip to content

"Can't find ruby interpreter in the PATH" #115

@vg250156

Description

@vg250156

Hello, I'm looking for usage information on this project, looking to incorporate it into an existing mono-repo. For our purposes as a primarily golang project, I can't rely on ruby already being pre-installed on our devs' machines, so I'm doing this in a VM that doesn't have ruby installed. A very basic install with the WORKSPACE, BUILD.bazel, a Gemfile and a ruby source file fails to bazel run with /usr/bin/env: ‘ruby’: No such file or directory

It will also output a DEBUG message with DEBUG: /home/vince/.cache/bazel/_bazel_vince/acbc1f1ef0fcc039a89f9e3efce79ee0/external/bazelruby_rules_ruby/ruby/private/toolchains/ruby_runtime.bzl:91:14: Can't find ruby interpreter in the PATH

This is due to the build target boilerplate calling /usr/bin/env ruby in a shebang. I would have assumed that rules_ruby would put the ruby that it has just built into PATH when executing a ruby_binary but this apparently isn't the case. Is there some kind of WORKSPACE invocation I'm missing? How can I get it to use the ruby that it's installing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions