"捆绑执行中间人"命令在 Mac OS Sierra 上失败



我正在逐步关注Ember Guides关于本地配置项目的说法。

我可以安装每个软件包管理器(Homebrew,Bundler(和Builder(Middleman(。

但是,当执行项目(捆绑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)>'

任何有相同问题的人?

解决!正如Yevgeniy Anfilofyev在评论中所说的那样,这里有一个完整的讨论。

遵循该问题,我最终所做的是替换ffi/ffi项目中的elcapt分支的rb文件内容。

这可能不是解决它的最优雅的方法,但它对我做了。

其他开发人员在评论中做了Yevgeniy提到的事情,这已经足够了。只需在该文件中替换变量的值:用libc ='/usr/lib/libc.dylib'替换libc = ffi :: platform :: libc字符串。

最新更新