【发布时间】:2020-03-27 05:36:19
【问题描述】:
我一直在尝试使用 Ruby 2.3.8 修复我的项目,我正在使用 rvm 安装 Ruby 2.3.8,但需要额外的工作才能在我的 Mac 上安装它,因为 2.3.8 需要无法用 openssl 1.1 解决.所以我需要找到如何安装openssl 1.0,因为 Homebrew 删除了openssl 1.0,所以需要额外的研究来解决这个问题。
在我的项目中,我使用的是 MySQL 5.7,要安装 MySQL 5.7,我需要再次安装 OpenSSL 1.1,因此它会自动安装 OpenSSL 1.1
当我进入我的项目并执行rake db:create 时,我收到了这样的错误:
rake aborted!
LoadError: library not found for class Digest::SHA1 -- digest/sha1
/Users/hoomacbuk/Documents/mekari/quickbook/config/boot.rb:4:in `<top (required)>'
/Users/hoomacbuk/Documents/mekari/quickbook/config/application.rb:1:in `<top (required)>'
/Users/hoomacbuk/Documents/mekari/quickbook/Rakefile:4:in `<top (required)>'
/Users/hoomacbuk/.rvm/gems/ruby-2.3.8/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Caused by:
LoadError: dlopen(/Users/hoomacbuk/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/x86_64-darwin18/digest/sha1.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /Users/hoomacbuk/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/x86_64-darwin18/digest/sha1.bundle
Reason: image not found - /Users/hoomacbuk/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/x86_64-darwin18/digest/sha1.bundle
/Users/hoomacbuk/Documents/mekari/quickbook/config/boot.rb:4:in `<top (required)>'
/Users/hoomacbuk/Documents/mekari/quickbook/config/application.rb:1:in `<top (required)>'
/Users/hoomacbuk/Documents/mekari/quickbook/Rakefile:4:in `<top (required)>'
/Users/hoomacbuk/.rvm/gems/ruby-2.3.8/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
当我运行bin/rake db:create 时,我再次收到此错误:
/Users/hoomacbuk/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/digest.rb:16:in `const_missing': library not found for class Digest::SHA1 -- digest/sha1 (LoadError)
如何让 Ruby 2.3.x 运行?我
【问题讨论】:
标签: ruby-on-rails ruby openssl rubygems