Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)出错

/Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:106:in `require': dlopen(/Users/silei/.rvm/rubies/ruby
-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin13.2.0/digest/md5.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError
)
  Referenced from: /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin13.2.0/digest/md5.bundle
  Reason: image not found - /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin13.2.0/digest/md5.bundle
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:106:in `require'
        from /Users/silei/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/generators/app_base.rb:1:in `'
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
        from /Users/silei/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/generators/rails/app/app_generator.rb:1:in `'
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
        from /Users/silei/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/commands/application.rb:29:in `'
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
        from /Users/silei/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/cli.rb:15:in `'
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
        from /Users/silei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
        from /Users/silei/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/bin/rails:9:in `'
        from /Users/silei/.rvm/gems/ruby-2.0.0-p247/bin/rails:23:in `load'

        from /Users/silei/.rvm/gems/ruby-2.0.0-p247/bin/rails:23:in `

'



原因:libssl找不到,其实是ruby升2.0.0的时候出错,gem需要重装。


解决方法:

重装ruby!!!!


rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

rvm reinstall 2.0.0          (主要步骤)

rvm 2.0.0 --default

gem source -r https://rubygems.org/

gem source -a https://ruby.taobao.org


你可能感兴趣的:(Ruby,on,Rails)