进入rails 文件夹, terminal输入rails console报告❌。

类似下面的

Running via Spring preloader in process
Traceback (most recent call last):
: from -e::in `<main>'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/2.5./rubygems/core_ext/kernel_require.rb::in `require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/2.5./rubygems/core_ext/kernel_require.rb::in `require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/activesupport-5.2./lib/active_support/dependencies.rb::in `load'
...
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/activesupport-5.2./lib/active_support/dependencies.rb::in `require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/activesupport-5.2./lib/active_support/dependencies.rb::in `load_dependency'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/activesupport-5.2./lib/active_support/dependencies.rb::in `block in require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/core_ext/kernel_require.rb::in `require'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/core_ext/kernel_require.rb::in `require_with_bootsnap_lfi'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/loaded_features_index.rb::in `register'
: from /Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/core_ext/kernel_require.rb::in `block in require_with_bootsnap_lfi'
/Users/wemteq/.rbenv/versions/2.5./lib/ruby/gems/2.5./gems/bootsnap-1.3./lib/bootsnap/load_path_cache/core_ext/kernel_require.rb::in `require': dlopen(/Users/wemteq/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin17/readline.bundle, 9):
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
Referenced from: /Users/wemteq/.rbenv/versions/2.5./lib/ruby/2.5./x86_64-darwin17/readline.bundle
Reason: image not found - /Users/wemteq/.rbenv/versions/2.5./lib/ruby/2.5./x86_64-darwin17/readline.bundle

直接google,

Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)

就能找到stackoverflow的答案。

原因是homebrew更新了libhistory的版本到8.0。

而rails的默认配置是7.0找不到对应的库。因此建立一个符号连接即可。

cd /usr/local/opt/readline/lib/
ls -l
//可以看到这个文件夹下的文件的版本是libhistory.8.0.dylib
//所以在这个文件夹下添加一个符号连接,使用命令ln -s(bash命令)
ln -s libhistory.8.0.dylib libhistory..dylib

然后rails c就可以正确打开了。

问题处理:Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)的更多相关文章

  1. dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib

    dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib Table of Contents 1. 启动时报错 ...

  2. dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib

    本地环境报错有 3 处,如下: 1. 执行命令,无论执行 php 的什么命令,统一报错 dyld: Library not loaded: /usr/local/opt/icu4c/lib/libic ...

  3. 【Python MySQLdb】Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib解决办法

    使用MySQLdb遇到以下错误 ImportError: dlopen(/Users/jackey/Documents/Xiaomi/Code/wda_python/lib/python2./site ...

  4. 解决Xcode10 Library not loaded: /usr/lib/libstdc++.6造成的crash及报错

    关键字1:dyld: Library not loaded: /usr/lib/libstdc++.6.dylib   Referenced from: 关键字2:Reason: no suitabl ...

  5. CentOS安装软件出现错误:bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

    CentOS安装软件出现错误: bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or d ...

  6. /usr/local /opt

    Linux 的软件安装目录是也是有讲究的,理解这一点,在对系统管理是有益的 /usr:系统级的目录,可以理解为C:/Windows/, /usr/lib理解为C:/Windows/System32. ...

  7. PHP提示dyld: Library not loaded问题解决

    Mac在命令行执行php命令时,如php -v 有错误提示: dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0..d ...

  8. 转:linux下面/usr/local和opt目录有何区别

    /usr/local下一般是你安装软件的目录,这个目录就相当于在windows下的programefiles这个目录 /opt这个目录是一些大型软件的安装目录,或者是一些服务程序的安装目录 /opt ...

  9. Linux下面/usr/local和opt目录

    1./opt This directory is reserved for all the software and add-on packages that are not part of the ...

随机推荐

  1. andorid证书生成

    首先得有JDK DOS窗口切换到证书要保存的目录 keytool -genkey -alias mykey -keyalg RSA -validity 40000 -keystore demo.key ...

  2. C#4.5-4.7学习总结

    4.5讲的是this关键字.它用于表示对当前实例的引用,它有三种用法,一是访问属性,解决与局部变量名称冲突问题,二是访问成员方法,在类中调用自己的成员方法,就是在一个方法中,通过this.方法名,调用 ...

  3. SQL Server (MSSQLSERVER) 服务由于下列服务特定错误而终止: %%17051

    问题出现:今天在给客户调试项目的时候,发现无法连接SQL server数据库 解决过程:1.在cmd命令窗口输入services.msc,打开服务窗口,找到SQL Server (MSSQLSERVE ...

  4. (备忘)打开office2010总是在配置进度

    1.同时按上键盘上面的windows键和R键,出现“运行” 2.输入“regedit”,回车进入注册表 3.点击“HKEY_CURRENT_USER”展开,依次“Software”--“Microso ...

  5. Spring框架源码阅读之Springs-beans(一)容器的基本实现概述(待续)

    去年通过实际框架代码的阅读,以及结合<Spring源码深度解析>和<Spring技术内幕>的阅读,对Spring框架内Bean模块有了一个整体性的认识.对此进行的总结性整理和回 ...

  6. JAVA可检测异常和非检测异常

    Java的可检测异常和非检测异常泾渭分明.可检测异常经编译器验证,对于声明抛出异常的任何方法,编译器将强制执行处理或声明规则. 非检测异常不遵循处理或声明规则.在产生此类异常时,不一定非要采取任何适当 ...

  7. mysql导入数据时报错

     问题 导入数据时有时会因为数据字段大的问题导入失败. mysql根据配置文件会限制server接受的数据包大小. 有时候大的插入和更新会被max_allowed_packet 参数限制掉,导致失败. ...

  8. Qt 快捷键 复制当前行 向上复制 && 向下复制

    网上的答案不一,我的快捷键是默认的配置,未做过修改. 向前复制当前行: Ctrl + Alt + up (向上箭头) 向后复制当前行:Ctrl + Alt + down(向下箭头) 补充一个:Ctrl ...

  9. 分治法——归并排序(mergesort)

    首先上代码. #include <iostream> using namespace std; int arr[11]; /*两个序列合并成一个序列.一共三个序列,所以用 3 根指针来处理 ...

  10. Python 同步IO/异步IO了解

    说明: 对于一次IO访问(以read举例),数据会先被拷贝到操作系统内核的缓冲区中,然后才会从操作系统内核的缓冲区拷贝到应用程序的地址空间.所以说,当一个read操作发生时,它会经历两个阶段: 1. ...