更新到 Rails 6 后捆绑包安装引发错误
Bundle install raise error after update to Rails 6
我将我的应用程序从 Rails 5 升级到 Rails 6,但之后当我 运行 bundle install
时,它在终端中出现以下错误。
Traceback (most recent call last):
31: from /Users/bunto/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `<main>'
30: from /Users/bunto/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `load'
29: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/exe/bundle:22:in `<top (required)>'
28: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
27: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/exe/bundle:30:in `block in <top (required)>'
26: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli.rb:18:in `start'
25: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
24: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli.rb:27:in `dispatch'
23: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
22: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
21: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
20: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli.rb:234:in `install'
19: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/settings.rb:144:in `temporary'
18: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli.rb:235:in `block in install'
17: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli/install.rb:65:in `run'
16: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
15: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
14: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/installer.rb:4:in `<top (required)>'
13: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
12: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
11: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/dependency_installer.rb:4:in `<top (required)>'
10: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
9: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
8: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/package.rb:44:in `<top (required)>'
7: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
6: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
5: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/security.rb:12:in `<top (required)>'
4: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
3: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
2: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/openssl.rb:13:in `<top (required)>'
1: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': dlopen(/Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle
Reason: image not found - /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle
我尝试重新安装 ruby 2.5.1 但没有任何改变。
我应该怎么做才能解决这个问题?谢谢!
我遇到了同样的错误。这是我的修复方法,希望对你有用
curl -L https://get.rvm.io | bash -s stable --ruby
rvm get stable
rvm reload
rvm reinstall 2.5.1
然后重新运行
bundle install
我将我的应用程序从 Rails 5 升级到 Rails 6,但之后当我 运行 bundle install
时,它在终端中出现以下错误。
Traceback (most recent call last):
31: from /Users/bunto/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `<main>'
30: from /Users/bunto/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `load'
29: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/exe/bundle:22:in `<top (required)>'
28: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
27: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/exe/bundle:30:in `block in <top (required)>'
26: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli.rb:18:in `start'
25: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
24: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli.rb:27:in `dispatch'
23: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
22: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
21: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
20: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli.rb:234:in `install'
19: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/settings.rb:144:in `temporary'
18: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli.rb:235:in `block in install'
17: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/cli/install.rb:65:in `run'
16: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
15: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
14: from /Users/bunto/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/installer.rb:4:in `<top (required)>'
13: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
12: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
11: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/dependency_installer.rb:4:in `<top (required)>'
10: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
9: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
8: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/package.rb:44:in `<top (required)>'
7: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
6: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
5: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/security.rb:12:in `<top (required)>'
4: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
3: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
2: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/openssl.rb:13:in `<top (required)>'
1: from /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': dlopen(/Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle
Reason: image not found - /Users/bunto/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle
我尝试重新安装 ruby 2.5.1 但没有任何改变。
我应该怎么做才能解决这个问题?谢谢!
我遇到了同样的错误。这是我的修复方法,希望对你有用
curl -L https://get.rvm.io | bash -s stable --ruby
rvm get stable
rvm reload
rvm reinstall 2.5.1
然后重新运行
bundle install