当我尝试在我的 mac 上安装 cocoapods 时,我安装了 ruby,如下所示:
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
Run Code Online (Sandbox Code Playgroud)
但是当我输入 command 时sudo gem install cocoapods,它显示错误:
ERROR: Loading command: install (LoadError)
dlopen(/usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle
Reason: image not found - /usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle
ERROR: While executing gem ... (NoMethodError)
undefined method invoke_with_build_args' for nil:NilClass
$ ruby reinstall
ruby: No such file or directory -- reinstall (LoadError)
Run Code Online (Sandbox Code Playgroud)
我是 ruby 的新手,也许它说缺少 openssl.bundle?
当我尝试 GCD 函数时dispatch_barrier_async,它在由 创建的队列上按预期工作dispatch_queue_create,而当我将它放在由 创建的全局队列上时dispatch_get_global_queue,屏障似乎不再起作用= =,有人可以解释吗?谢谢~
演示图