简体   繁体   English

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

[英]Bundle Install Fails: Error loading Rubygems plugin after I deleted files

I am new to Ruby and Rails and am trying to get through the Hartl rails web development tutorial . 我是Ruby和Rails的新手,并且正在尝试通过Hartl rails Web开发教程 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. 在运行brew doctor ,自制软件指示​​我删除一些文件,除非我故意将它们放在原处。 I deleted them and brew doctor said I was all clear. 我删除了它们, brew doctor说我很清楚。

Now, further along in the tutorial I am trying to deploy an app to Heroku. 现在,在本教程的进一步内容中,我正在尝试将应用程序部署到Heroku。 But I've found out that my gemfile.lock file was never updated by bundle install . 但是我发现我的gemfile.lock文件从未通过bundle install更新。 In fact, bundle install hadn't been working for me at all. 实际上, bundle install根本不适合我。 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). 它似乎与我删除的文件之一有关(我基于Library not loaded: /opt/local/lib/libssl.1.0.0.dylibLibrary not loaded: /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? 即使brew doctor对他们感到担忧,如果我不理会他们,自制酒会奏效吗?

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>'

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来替换缺少的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM