【问题标题】:rake db create abortedrake db 创建中止
【发布时间】: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


    【解决方案1】:

    您的 ruby​​ 版本似乎有问题。

    卸载当前版本并重新安装相同的版本,然后重试。

    rvm uninstall 2.3.8
    

    然后

    rvm install 2.3.8
    

    【讨论】:

    • 我已经这样做了很多次,我不能只安装 rvm 2.3.8,也必须使用 openssl 目录,我已经这样做了很多次但没有工作
    • 请发布您在尝试安装 ruby​​ 时收到的确切错误
    猜你喜欢
    • 1970-01-01
    • 2013-03-12
    • 2011-08-30
    • 1970-01-01
    • 2011-04-21
    • 2012-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多