Ruby-build: rbenv install not picking up readline on macos 10.13 high sierra

Created on 12 Oct 2017  路  9Comments  路  Source: rbenv/ruby-build

I just did a clean install for the high sierra. and need to set my dev environmet up.
so basically I've done these things

  1. download xcode from App Store. and have xcode command line tool installed.
  2. brew install rbenv ruby-build readline
  3. set readline LDFLAGS / CPPFLAGS variables in my ~/.zshrc according to brew info readline
  4. I copy-pasted this to install ruby 2.3.1
RUBY_CONFIGURE_OPTS=--with-readline-dir="$(brew --prefix readline)" rbenv install 2.3.1

and there goes

ruby-build: use openssl from homebrew
Downloading ruby-2.3.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1...
Installed ruby-2.3.1 to /Users/unayung/.rbenv/versions/2.3.1

there is no readline mentioned by rbenv / ruby-build
and when I goes to IRB try to input some words in chinese
the key input became something like hotkey (# / ------- / args / list files in current folder)

I have no idea what's going on.
did I messed up in any step above ? thanks.

Most helpful comment

Fixed! I did the following:

  1. brew reinstall rbenv ruby-build readline,
  2. Removed all ruby versions I had using rbenv uninstall
  3. Installed the ruby version that I currently need (2.6.3 in my case)

It said:

Installing ruby-2.6.3...
ruby-build: use readline from homebrew

And it worked! Hope this helps someone else 馃檪

All 9 comments

I've done another clean install for High Sierra. and make sure install Xcode and command line tools before install homebrew.

now I have my IRB and Rails console working perfectly.

I am having the same issue. Tried reinstalling readline and Ruby 2.3.1, on MacOS Mojave 10.14.5
Actually tired of this... can't use history with irb and rails console.
Re-installing all OS isn't the solution I am looking for.

It looks like you're having problems with ruby-build, which is the plugin that provides the rbenv install command. Sorry to hear that you're having trouble 馃檱

  1. First, ensure that ruby-build is updated to the latest version.
  2. If your problem persists, check existing issues in the ruby-build repo and open a new one if necessary. When opening a new issue, please attach the full build log.

My apologies. I didn't read properly and thought this issue was opened in the rbenv/rbenv repo, but you filed it correctly.

Same issue as @spidergears here, I'm on MacOS Mojave 10.14.5 . It's a fresh install I made a few weeks ago and really can't reinstall the whole OS again. There must be a solution I hope! Thanks for helping

Fixed! I did the following:

  1. brew reinstall rbenv ruby-build readline,
  2. Removed all ruby versions I had using rbenv uninstall
  3. Installed the ruby version that I currently need (2.6.3 in my case)

It said:

Installing ruby-2.6.3...
ruby-build: use readline from homebrew

And it worked! Hope this helps someone else 馃檪

@Unayung Is this still an issue? 馃檱

nope. it works :D
thanks @mislav @algodave

RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(/usr/local/bin/brew --prefix [email protected]) --with-readline-dir=/usr/local/opt/readline" rbenv install 2.3.8

Was this page helpful?
0 / 5 - 0 ratings