Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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).

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.

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>'
like image 397
mrwnt10 Avatar asked Aug 29 '13 21:08

mrwnt10


1 Answers

Thanks to Nick Veys for this answer:

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

like image 98
mrwnt10 Avatar answered Sep 30 '22 01:09

mrwnt10