I have recently reinstalled ruby 2.1.2 like so since I wanted to install a gem (ruby-debug-ide
)
sudo rvm reinstall 2.1.2 --disable-binary --with
I was able to resolve the same problem by reinstalling Ruby. On the Homebrew side reinstalling readline (even from source) didn't help.
I'm using RVM so this sorted it for me:
rvm reinstall 2.3.1
I think Homebrew may have pulled in readline v7 recently for some other package, which I suspect could well be the culprit.
This solved my problem:
Replace libreadline.{version}.dylib with the version you are getting error for:
ln -s /usr/local/opt/readline/lib/libreadline.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
Adding gem 'rb-readline'
to my Gemfile
fixed this problem for me. See https://github.com/ConnorAtherton/rb-readline.
On OSX using homebrew, you can specify which readline version is active. e.g.
brew switch readline 6.3.8
(it's likely installed in /usr/local/Cellar/readline/
)