rutie icon indicating copy to clipboard operation
rutie copied to clipboard

Build script fails to locate Ruby

Open milgner opened this issue 4 years ago • 2 comments

Running in an environment that uses asdf (similar to RVM) to manage multiple Ruby versions, the build script fails to locate ruby.

The corresponding error message is

Couldn't find a valid value for RbConfig::CONFIG['ENABLE_SHARED']

but the real reason is that executing ruby fails so the code cannot be evaluated at all.

I'm a bloody noob when it comes to Rust, but I'll try to improve this. Two things come to mind:

  • improve error message to indicate that Ruby wasn't found
  • run command in the context of the parent shell to use its PATH

Any hints welcome, of course :sweat_smile:

I did find the workaround of setting the RUBY environment variable to the full path of the executable which makes my build work, but I feel like this would be helpful for other users.

milgner avatar Aug 07 '21 21:08 milgner

Did some reading up on this and realized that Command::new is already supposed to check PATH for the executable as defined by the OS. Also checked the output of PATH during the build script and it looks fine too, so the environment does get inherited correctly. Additional investigation is needed on why ruby cannot be found on my system.

milgner avatar Aug 09 '21 06:08 milgner

Thanks for sharing this info. I've never used asdf. I'm glad you found a workaround. I'm not sure how to go about solving that without first reproducing the issue which means I'll need to have what you have set up set up here locally.

danielpclark avatar Sep 07 '21 00:09 danielpclark