rerun icon indicating copy to clipboard operation
rerun copied to clipboard

Use `RbConfig.ruby` to invoke ruby executable

Open ccmywish opened this issue 1 year ago • 0 comments

On Windows,If we use rbenv for Windows, rerun ./app.rb and rerun ruby ./app.rb will not work, because it seem directly call ruby.exe.

rbenv for Windows has make ruby.exe a fake stub (not the real ruby.exe), so the method above won't work. So, how about making the invocation using RbConfig.ruby to get an absolute path?

irb(main):001:0> RbConfig.ruby
=> "C:/Ruby-on-Windows/3.2.0-1/bin/ruby.exe"

ccmywish avatar Jun 11 '23 11:06 ccmywish