ruby-install
ruby-install copied to clipboard
macOS JRuby fails on cp with src dir
(Sorry on mobile, so accidentally sent original bug without description.)
Description
On macOS if install JRuby like this:
$ mkdir temp
$ ruby-install -s temp jruby
Fails on copy_into
function:
cp: temp/jruby-9.3.4.0/*: No such file or directory
I added a pwd
to copy_into in util.sh, and I see that it actually CDed into that directory:
pwd
/Users/.../temp/jruby-9.3.4.0
So workaround is to use full, absolute path (instead of relative). Interestingly though, just using temp
works for installing ruby
.
Don't know if this is by design or not.
Environment
- Darwin kernel v21.4.0
- bash (not zsh)
- ruby-install v0.8.3
This is because bin/ruby-install
cd
s into $src_dir/$ruby_dir_name
. So if the src_dir
is relative, it won't be able to find the $src_dir/$ruby_dir_name
while within $src_dir/$ruby_dir_name
. We could change the copy_into
call to copy the current directory, or replace install_ruby
of jruby
with better logic that is specifically for installing binary or pre-compiled rubies.