2017-04-17 11 views
0

私はステップバイステップで、Ember Guidesがプロジェクトをローカルに設定すると言うことを何度も続けています。'bundle exec middleman'コマンドがMac OS Sierraで失敗する

すべてのパッケージマネージャー(Homebrew、Bundler)とビルダー(Middleman)をインストールします。

しかしプロジェクト(execの仲介をバンドル)を実行するとき、私はエラーを取得し、サーバが起動しない:同じ問題で

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)>' 

誰ですか?

+1

インストールされたffi gem内の 'lib/ffi/library.rb'を編集してみてください。 'LIBC = FFI :: Platform :: LIBC'文字列を' LIBC = '/ usr/lib/libc.dylib'に置き換えてください。完全な議論があります:https://github.com/ffi/ffi/issues/461 –

+1

ありがとう!それは私に道を示した。その行を置き換えるだけで私のためにはできませんでした。別のエラーで動かなくなりました(libcurl.dylibが見つかりませんでした)。だから私は 'elcapt'ブランチをダウンロードするように言ったアドバイスを続けました。そこからlibrary.rbファイルを取得し、私のローカルRubyインストールに置き換えました。それを解決する最もエレガントな方法ではないかもしれませんが、私のためにそれをしました:)。再度、感謝します – ElPiter

答えて

0

解決済み! Yevgeniy Anfilofyevがコメントで言ったように、完全な議論hereがあります。

私が最後にしたのは、library.rb file content from the elcapt branch in the ffi/ffi projectを置き換えることでした。

これは、これを解決する最もエレガントな方法ではないかもしれませんが、それは私のためにしました。

他の開発者は、彼のコメントでYevgeniyが述べたことを行い、それで十分でした。 LIBC = '/usr/lib/libc.dylib'でLIBC = FFI :: Platform :: LIBC文字列を置き換えます。

関連する問題