我已经在我的 Mac 上安装了 coreAudio,我想启动 outloop_sine.rb 示例:
ruby outloop_sine.rb
然后返回:
/usr/local/Cellar/ruby/2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/usr/local/Cellar/ruby/2.1.1/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0/narray-0.6.0.9/narray.bundle, 9): Library not loaded: /usr/local/opt/ruby/lib/libruby.2.1.0.dylib (LoadError)
Referenced from: /usr/local/Cellar/ruby/2.1.1/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0/narray-0.6.0.9/narray.bundle
Reason: image not found - /usr/local/Cellar/ruby/2.1.1/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0/narray-0.6.0.9/narray.bundle
from /usr/local/Cellar/ruby/2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/Cellar/ruby/2.1.1/lib/ruby/gems/2.1.0/gems/coreaudio-0.0.10/lib/coreaudio.rb:1:in `<top (required)>'
from /usr/local/Cellar/ruby/2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from /usr/local/Cellar/ruby/2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /usr/local/Cellar/ruby/2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from outloop_sine.rb:1:in `<main>'
然后我安装所需的 narray:
sudo gem install narray
那工作,但是当我再次启动 outloop_sine.rb 示例时,会出现相同的错误...
您的帮助:
ruby --version
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
和:
ls -l /usr/local/Cellar/ruby/2.1.1/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0/narray-0.6.0.9/
total 536
-rw-r--r-- 1 root admin 0 9 aoû 00:14 gem.build_complete
-rw-r--r-- 1 root admin 5441 9 aoû 00:14 gem_make.out
-rw-r--r-- 1 root admin 9883 9 aoû 00:14 mkmf.log
-rwxr-xr-x 1 root admin 223684 9 aoû 00:04 narray.bundle
-rw-r--r-- 1 root admin 5104 9 aoû 00:04 narray.h
-rw-r--r-- 1 root admin 166 9 aoû 00:04 narray_config.h
-rw-r--r-- 1 root admin 7307 9 aoû 00:04 narray_ext.rb
-rw-r--r-- 1 root admin 5546 9 aoû 00:04 nmatrix.rb
最后,我没有 libruby:
ls /usr/local/opt/ruby/lib/
ls: /usr/local/opt/ruby/lib/: No such file or directory
第一条错误消息需要:
Library not loaded: /usr/local/opt/ruby/lib/libruby.2.1.0.dylib (LoadError)
我的 coreAudio gem 有什么问题?