Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/400.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ';bundle exec middleman';命令在Mac OS上失败_Javascript_Ruby_Macos_Ember.js - Fatal编程技术网

Javascript ';bundle exec middleman';命令在Mac OS上失败

Javascript ';bundle exec middleman';命令在Mac OS上失败,javascript,ruby,macos,ember.js,Javascript,Ruby,Macos,Ember.js,我正在一步一步地关注关于本地配置项目的内容 我可以安装每个软件包管理器(自制软件包、捆绑软件包)和构建器(中间商) 但在执行项目(bundle exec middleman)时,我遇到一个错误,服务器无法启动: MacBook-Pro-de-Pedro:guides pedro$ bundle exec middleman bundler: failed to load command: middleman (/usr/local/bin/middleman) LoadError: Could

我正在一步一步地关注关于本地配置项目的内容

我可以安装每个软件包管理器(自制软件包、捆绑软件包)和构建器(中间商)

但在执行项目(bundle exec middleman)时,我遇到一个错误,服务器无法启动:

MacBook-Pro-de-Pedro:guides pedro$ bundle exec middleman
bundler: failed to load command: middleman (/usr/local/bin/middleman)
LoadError: Could not open library 'c': dlopen(c, 5): image not found.
Could not open library 'libc.dylib': dlopen(libc.dylib, 5): image not found
/Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10/lib/ffi/library.rb:133:in `block in ffi_lib'
/Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `map'
/Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `ffi_lib'
/Library/Ruby/Gems/2.0.0/gems/ethon-0.8.0/lib/ethon/libc.rb:8:in `<module:Libc>'
/Library/Ruby/Gems/2.0.0/gems/ethon-0.8.0/lib/ethon/libc.rb:6:in `<module:Ethon>'
/Library/Ruby/Gems/2.0.0/gems/ethon-0.8.0/lib/ethon/libc.rb:1:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/ethon-0.8.0/lib/ethon.rb:10:in `require'
/Library/Ruby/Gems/2.0.0/gems/ethon-0.8.0/lib/ethon.rb:10:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/typhoeus-0.8.0/lib/typhoeus.rb:2:in `require'
/Library/Ruby/Gems/2.0.0/gems/typhoeus-0.8.0/lib/typhoeus.rb:2:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/html-proofer-2.5.2/lib/html/proofer/url_validator.rb:1:in `require'
/Library/Ruby/Gems/2.0.0/gems/html-proofer-2.5.2/lib/html/proofer/url_validator.rb:1:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/html-proofer-2.5.2/lib/html/proofer.rb:4:in `require'
/Library/Ruby/Gems/2.0.0/gems/html-proofer-2.5.2/lib/html/proofer.rb:4:in `block in require_all'
/Library/Ruby/Gems/2.0.0/gems/html-proofer-2.5.2/lib/html/proofer.rb:3:in `each'
/Library/Ruby/Gems/2.0.0/gems/html-proofer-2.5.2/lib/html/proofer.rb:3:in `require_all'
/Library/Ruby/Gems/2.0.0/gems/html-proofer-2.5.2/lib/html/proofer.rb:8:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:105:in `require'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:105:in `rescue in block in require'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:82:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
/Library/Ruby/Gems/2.0.0/gems/middleman-core-3.4.0/lib/middleman-core/load_paths.rb:37:in `setup_load_paths'
/Library/Ruby/Gems/2.0.0/gems/middleman-core-3.4.0/bin/middleman:10:in `<top (required)>'
/usr/local/bin/middleman:23:in `load'
/usr/local/bin/middleman:23:in `<top (required)>'
MacBookPro de Pedro:guides Pedro$bundle exec middleman
绑定器:无法加载命令:middleman(/usr/local/bin/middleman)
LoadError:无法打开库“c”:dlopen(c,5):找不到映像。
无法打开库“libc.dylib”:dlopen(libc.dylib,5):找不到映像
/Library/Ruby/Gems/2.0.0/Gems/ffi-1.9.10/lib/ffi/Library.rb:133:in'block in ffi_lib'
/Library/Ruby/Gems/2.0.0/Gems/ffi-1.9.10/lib/ffi/Library.rb:100:in'map'
/Library/Ruby/Gems/2.0.0/Gems/ffi-1.9.10/lib/ffi/Library.rb:100:in'ffi_lib'
/Library/Ruby/Gems/2.0.0/Gems/eton-0.8.0/lib/eton/libc.rb:8:in`'
/Library/Ruby/Gems/2.0.0/Gems/eton-0.8.0/lib/eton/libc.rb:6:in`'
/Library/Ruby/Gems/2.0.0/Gems/eton-0.8.0/lib/eton/libc.rb:1:in`'
/Library/Ruby/Gems/2.0.0/Gems/ethon-0.8.0/lib/ethon.rb:10:in'require'
/Library/Ruby/Gems/2.0.0/Gems/eton-0.8.0/lib/eton.rb:10:in`'
/Library/Ruby/Gems/2.0.0/Gems/typhous-0.8.0/lib/typhous.rb:2:in'require'
/Library/Ruby/Gems/2.0.0/Gems/typhous-0.8.0/lib/typhous.rb:2:in`'
/Library/Ruby/Gems/2.0.0/Gems/html-proofer-2.5.2/lib/html/proofer/url_validator.rb:1:in'require'
/Library/Ruby/Gems/2.0.0/Gems/html-proofer-2.5.2/lib/html/proofer/url\u validator.rb:1:in`'
/Library/Ruby/Gems/2.0.0/Gems/html-proofer-2.5.2/lib/html/proofer.rb:4:in'require'
/Library/Ruby/Gems/2.0.0/Gems/html-proofer-2.5.2/lib/html/proofer.rb:4:in'block in require_all'
/Library/Ruby/Gems/2.0.0/Gems/html-proofer-2.5.2/lib/html/proofer.rb:3:in'each'
/Library/Ruby/Gems/2.0.0/Gems/html-proofer-2.5.2/lib/html/proofer.rb:3:in'require_all'
/Library/Ruby/Gems/2.0.0/Gems/html-proofer-2.5.2/lib/html/proofer.rb:8:in`'
/Library/Ruby/Gems/2.0.0/Gems/bundler-1.14.6/lib/bundler/runtime.rb:105:in'require'
/Library/Ruby/Gems/2.0.0/Gems/bundler-1.14.6/lib/bundler/runtime.rb:105:“请求中的块中救援”
/Library/Ruby/Gems/2.0.0/Gems/bundler-1.14.6/lib/bundler/runtime.rb:82:in'block in require'
/Library/Ruby/Gems/2.0.0/Gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in'each'
/Library/Ruby/Gems/2.0.0/Gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in'require'
/Library/Ruby/Gems/2.0.0/Gems/bundler-1.14.6/lib/bundler.rb:107:in'require'
/Library/Ruby/Gems/2.0.0/Gems/middleman-core-3.4.0/lib/middleman-core/load\u路径。rb:37:in'setup\u load\u路径'
/Library/Ruby/Gems/2.0.0/Gems/middleman-core-3.4.0/bin/middleman:10:in`'
/usr/local/bin/middleman:23:in'load'
/usr/local/bin/middleman:23:in`'

有人有同样的问题吗?

解决了!正如叶夫根尼·安菲洛费耶夫(Yevgeniy Anfilofyev)在评论中所说,这是一次充分的讨论

在那个问题之后,我最终做的是替换

这可能不是解决这个问题的最优雅的方法,但它为我做到了


其他开发者做了Yevgeniy在评论中提到的事情,这就足够了。只需替换该文件中变量的值:将LIBC=FFI::Platform::LIBC string替换为LIBC='/usr/lib/LIBC.dylib.

尝试在已安装的FFI gem中编辑
lib/FFI/library.rb
。将
LIBC=FFI::Platform::LIBC
字符串替换为
LIBC='/usr/lib/LIBC.dylib'
。有充分的讨论:非常感谢!它给我指明了方向。只是换了那条线对我没用。我陷入了另一个错误(找不到libcurl.dylib)。因此,我按照建议下载“elcapt”分支。我从那里得到library.rb文件,并将其替换到本地Ruby安装中。也许这不是最优雅的解决方法,但它为我做到了:)。再次感谢