Bundle安装失败:删除文件后加载Rubygems插件时出错

时间:2022-09-18 23:07:00

I am new to Ruby and Rails and am trying to get through the Hartl rails web development tutorial. During the course of the tutorial, I installed homebrew. After running brew doctor, homebrew instructed me to delete a handful of files unless I had put them where they were at on purpose. I deleted them and brew doctor said I was all clear.

我是Ruby和Rails的新手,正在尝试通过Hartl Rails web开发教程。在本教程中,我安装了homebrew。在运行了brew doctor之后,homebrew命令我删除一些文件,除非我故意把它们放在它们所在的位置。我删除了它们,酿造医生说我很清楚。

Now, further along in the tutorial I am trying to deploy an app to Heroku. But I've found out that my gemfile.lock file was never updated by bundle install. In fact, bundle install hadn't been working for me at all. The error output is below. It appears to be related to one of the files I deleted (I base this on the line Library not loaded: /opt/local/lib/libssl.1.0.0.dylib; I remember deleting that file).

现在,在本教程的后面,我正在尝试将一个应用程序部署到Heroku。但我发现了我的gemfile。绑定包安装从来没有更新锁文件。事实上,bundle install根本就没有为我工作过。错误输出如下。它似乎与我删除的一个文件有关(我将其基于未加载的行库:/opt/local/lib/libssl.1.0.0.dylib;我记得删除了那个文件)。

How do I fix this? From my research, I think I need to reinstall something, but I can't figure out what. I installed Postgresql, but that did nothing.

我怎么修复这个?根据我的研究,我认为我需要重新安装一些东西,但我不知道是什么。我安装了Postgresql,但什么也没做。

Secondarily, was deleting all of those files a huge mistake? How can I get them back (I also can't scroll up enough in my Terminal to see their names)? Would homebrew have worked if I had left them alone even though brew doctor raised concerns about them?

其次,删除所有这些文件是一个巨大的错误吗?我怎么才能把它们找回来(我也不能在终端上滚动到足够多的页面来查看它们的名字)?如果我不去管他们的话,自制啤酒还会有用吗?

Wyatts-MacBook-Pro:first_app Wyatt$ bundle installError loading RubyGems plugin "/Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/rubygems-bundler-1.2.2/lib/rubygems_plugin.rb": dlopen(/Users/Wyatt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin11.4.2/openssl.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
  Referenced from: /Users/Wyatt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin11.4.2/openssl.bundle
  Reason: image not found - /Users/Wyatt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin11.4.2/openssl.bundle (LoadError)
/Users/Wyatt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': dlopen(/Users/Wyatt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin11.4.2/digest/sha1.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /Users/Wyatt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin11.4.2/digest/sha1.bundle
  Reason: image not found - /Users/Wyatt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin11.4.2/digest/sha1.bundle
    from /Users/Wyatt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/definition.rb:1:in `<top (required)>'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/cli.rb:245:in `install'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle:23:in `load'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle:23:in `<main>'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/Wyatt/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/bin/ruby_noexec_wrapper:14:in `<main>'

1 个解决方案

#1


5  

Thanks to Nick Veys for this answer:

感谢Nick Veys的回答:

I just had to run brew reinstall openssl to replace the missing library.

我只需要运行brew reinstall openssl来替换丢失的库。

#1


5  

Thanks to Nick Veys for this answer:

感谢Nick Veys的回答:

I just had to run brew reinstall openssl to replace the missing library.

我只需要运行brew reinstall openssl来替换丢失的库。