ruby-build: On Mac Sierra Beta, rbenv install 2.4.0 hangs at "use readline from homebrew"
rbenv install 2.4.0
ruby-build: use openssl from homebrew
Downloading ruby-2.4.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2
Installing ruby-2.4.0...
ruby-build: use readline from homebrew
... at which point I hang
I googled like crazy, reinstalled new brew versions of readline, openssl libyaml and libffi. Any ideas?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 23
- Comments: 34 (2 by maintainers)
Patience
This fixed it for me:
To get better visibility on what’s going on in the build process, I recommend running builds with
-v
. ie.:rbenv install -v 2.4.21
@paniclater I encountered the same thing. Without feedback, it does appear to hang, but after about 3-4 minutes, the install completes successfully.
While we’re collecting data: I gave it several hours. It did not work.
I thought I was having this problem, but I tailed the logs and cannot reproduce the issue. I think that it just takes a long time to install and without the output feedback I was assuming it was hanging.
Thanks for sharing the workaround, @lowderl.
It’s strange that this step should fix the installation because
--with-readline-dir="$(brew --prefix readline)"
is basically identical to what the “use readline from homebrew” step does.I don’t run macOS beta so I can’t look into this yet, but if anyone is willing to look more closely into this, I would be grateful. Two things could be of use:
tail -f "$(ls -t $TMPDIR/ruby-build.*.log | head -1)"
in another tab;set -x
to the beginning ofruby-build
executable.Indeed, that’s what it was for me, too. Might be a UI enhancement to include some kind of progress indicator, determinate or indeterminate, just to provide transparency and alleviate these issues.
It took several minutes for me, but it did eventually succeed.
Approx. 6 mins for me on a 2014 MBP on High Sierra, worked all fine.
Followed @orospakr’s advice, running in verbose mode, and It’s just taking an extremely long time for me.
Will follow up about whether it finishes successfully.
Update
How much patience?
For me, 6 minutes. Hope that helps!
Took about 6-7 minutes, but it finally finished. No additional code needed.
@lowderdev You have made my day, hour wasted - IOU a beer!
Had to wait a few minutes, it worked.
@mislav please change the default behaviour to verbose mode, or fix the existing UI! No program should ever do anything that takes several seconds, let alone minutes, without telling the user why they have to wait and and trying to approximate the time remaining! In this thread alone, hundreds of probably very reasonable and smart people have been confused by this.
Took a few minutes for me, patience everyone.
In my case it helped to deactivate the antivirus software Avira.
This works for me too, tks @lowderl !
If you used to use rvm, make sure that you removed it completely.