rails console doesn't load due to libreadline

前端 未结 10 642
心在旅途
心在旅途 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:35

    I was experiencing a similar problem but with more updated versions. The error I had was:

    dlopen(/Users/juanjo/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
      Referenced from: /Users/juanjo/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/readline.bundle
      Reason: image not found - /Users/juanjo/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/readline.bundle
    

    The important part is Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib

    Looking at /usr/local/opt/readline/lib/ I saw I had installed libreadline.8.dylib, not 7.

    To solve my problem, guided by the other answers, I had to do the following:

    ln -s /usr/local/opt/readline/lib/libreadline.8.dylib /usr/local/opt/readline/lib/libreadline.7.dylib

    In other words: ln -s /.../[libreadline you have] /.../[libreadline you need].

提交回复
热议问题