Brew升级后无法加载垃圾箱/导轨

时间:2019-02-15 09:22:15

标签: ruby-on-rails ruby-on-rails-5

我正在研究rails5项目。我不小心输入了brew upgrade(我应该先卸载imagemagick然后再安装)

bin/rails c命令现在不起作用。

环境

  • Mac os 10.12
  • 红宝石2.5.1p57(2018-03-29修订版63029) [x86_64-darwin16]
  • 使用gem'mysql2','0.4.10'滚动5.1.6.1

我尝试过:

  1. brew link readline --force

  2. ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib

  3. brew info readline
    readline:稳定的8.0.0(瓶装)[仅可放入水壶] 用于命令行编辑的库 /usr/local/Cellar/readline/8.0.0(49个文件,1.5MB)* 从瓶子倒在2019-02-15 17:16:19

但两者仍然没有任何变化,选中mysql.server start并得到Starting MySQL.......... SUCCESS!

还检查了mysql --version,得到了mysql Ver 8.0.15 for osx10.12 on x86_64 (Homebrew)

bin/rails s
Sorry, you can't use byebug without Readline. To solve this, you need 
to rebuild Ruby with Readline support. If using Ubuntu, try `sudo apt-get
install libreadline-dev` and then reinstall your Ruby.
Traceback (most recent call last):
68: from bin/rails:6:in `<main>'
67: from bin/rails:6:in `require'
66: from     

**dlopen(/Users/arthur/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64- 
darwin16/readline.bundle, 9): Library not loaded: 
/usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
Referenced from: 
/Users/arthur/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64- 
darwin16/readline.bundle
Reason: image not found - 
/Users/arthur/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64- 
darwin16/readline.bundle**

1 个答案:

答案 0 :(得分:2)

已解决的问题。

添加了“ rb-readline” gem文件和捆绑包安装。

https://github.com/deivid-rodriguez/byebug/issues/289