rails console doesn't load due to libreadline

前端 未结 10 606
心在旅途
心在旅途 2020-12-02 15:12

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         


        
相关标签:
10条回答
  • 2020-12-02 15:42

    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.

    0 讨论(0)
  • 2020-12-02 15:45

    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
    
    0 讨论(0)
  • 2020-12-02 15:56

    Adding gem 'rb-readline' to my Gemfile fixed this problem for me. See https://github.com/ConnorAtherton/rb-readline.

    0 讨论(0)
  • 2020-12-02 15:58

    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/ )

    0 讨论(0)
提交回复
热议问题