2013-08-24 11 views
7

Macbook Proでhomebrew、xcode(コマンドラインツールを使用)、およびlibffiを使用してOSX 10.8.4を使用する。rvm bundle installを使用してffi 1.9.0をインストールできない - OSX 10.8.4

私はrvmとruby-1.9.3-p448をインストールし、omega.ecoopというgemsetを持っています。このプロジェクトに必要な宝石をリストする宝石ファイルがあります。しかし、バンドルチェックを実行した後、私はそれらをインストールすることができません:

Bundler can't satisfy your Gemfile's dependencies. 

これは正しくインストールされていないためです。だから私は使用:

bundle install 

次を生成する:

Sams-MacBook-Pro:ecoop Sam$ bundle install 
Fetching gem metadata from https://rubygems.org/.......... 
Fetching gem metadata from https://rubygems.org/.. 
Resolving dependencies... 
Using addressable (2.3.5) 
Using chunky_png (1.2.8) 
Using fssm (0.2.10) 
Using sass (3.2.10) 
Using compass (0.12.2) 
Using breakpoint (2.0.6) 
Using coderay (1.0.9) 
Using compass-blend-modes (0.0.2) 
Using color-schemer (0.2.5) 
Using compass-normalize (1.4.3) 
Using compass-rgbapng (0.2.1) 
Using compass-validator (3.0.1) 
Using css_parser (1.3.5) 
Using eventmachine (1.0.3) 
Using http_parser.rb (0.5.3) 
Using em-websocket (0.5.0) 
Installing ffi (1.9.0) 

まで、すべてが、うまく行く:このコマンドは、どちらか(GEMインストールFFIの-v「1.9を動作しません

Installing ffi (1.9.0) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

    /Users/Sam/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb 
checking for ffi.h... no 
checking for ffi.h in /usr/local/include,/usr/include/ffi... no 
checking for rb_thread_blocking_region()... yes 
checking for rb_thread_call_with_gvl()... yes 
checking for rb_thread_call_without_gvl()... yes 
checking for ffi_prep_cif_var()... no 
creating extconf.h 
creating Makefile 

make 
mkdir -p "/Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64; (if [ ! -f "/Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64/Makefile ]; then echo "Configuring libffi for x86_64"; cd "/Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64 && env CC=" gcc-4.6" CFLAGS="-arch x86_64 " LDFLAGS="-arch x86_64" "/Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c/libffi"/configure --disable-static --with-pic=yes --disable-dependency-tracking --host=x86_64-apple-darwin > /dev/null; fi); env MACOSX_DEPLOYMENT_TARGET=10.4 make -C "/Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64 
Configuring libffi for x86_64 
configure: WARNING: if you wanted to set the --build type, don't use --host. 
    If a cross compiler is detected then cross compile mode will be used 
configure: error: in `/Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c/libffi-x86_64': 
configure: error: C compiler cannot create executables 
See `config.log' for more details 
make[1]: *** No targets specified and no makefile found. Stop. 
make: *** ["/Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64/.libs/libffi_convenience.a] Error 2 


Gem files will remain installed in /Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0 for inspection. 
Results logged to /Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c/gem_make.out 

An error occurred while installing ffi (1.9.0), and Bundler cannot continue. 
Make sure that `gem install ffi -v '1.9.0'` succeeds before bundling. 

.0 ')、私は同じエラーが発生します。私が試した:私は読んだことがある

sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2 

can't setup ruby environment - installing fii gem error

Bundle update fails on ffi

Bundle update fails on ffi

Error installing ffi

gem install ffi -v '1.1.5' osx 10.8

まだ運がありません。私は、RVMを設定するには、このガイドに従っ:

http://portertech.ca/2010/03/26/homebrew--rvm--awesome/

このことができます場合はFFI-1.0.11が滞りなくインストールし、FFF-1.9.0は​​(http://rubygems.org/gems/ffi/versions)をインストールしません。

/Users/Sam/.rvm/gems/[email protected]/gems/ffi-1.0.11 (no problem) 

は、私は道に沿っていくつかの新しいスキルを習得するには、コマンドラインのみ(というよりもjewelryboxのGUI)を使用していたが、かなりここで立ち往生。どんな助けでも感謝します、ありがとう。

EDIT

だから私は、別のアプローチを試みた私は多分それは互換性がありませんでしたルビーのバージョンだと思った:

rvm install 2.0.0 

は、ルビー2.0.0

を使用して、この時間をgemset作成
rvm use [email protected] --create 

現在のジェムセットとして選択されていることを確認します(いくつかの宝石をインストールする準備ができています)

rvm gemset list 

gemsets for ruby-2.0.0-p247 (found in /Users/Sam/.rvm/gems/ruby-2.0.0-p247) 
(default) 
global 
=> omega.ecoop 

試してインストールしてください

bundle install 

Sams-MacBook-Pro:ecoop Sam$ bundle install 
Fetching gem metadata from https://rubygems.org/.......... 
Fetching gem metadata from https://rubygems.org/.. 
Resolving dependencies... 
Installing addressable (2.3.5) 
Installing chunky_png (1.2.8) 
Installing fssm (0.2.10) 
Installing sass (3.2.10) 
Installing compass (0.12.2) 
Installing breakpoint (2.0.6) 
Installing coderay (1.0.9) 
Installing compass-blend-modes (0.0.2) 
Installing color-schemer (0.2.5) 
Installing compass-normalize (1.4.3) 
Installing compass-rgbapng (0.2.1) 
Installing compass-validator (3.0.1) 
Installing css_parser (1.3.5) 
Installing eventmachine (1.0.3) 
Installing http_parser.rb (0.5.3) 
Installing em-websocket (0.5.0) 
Installing ffi (1.9.0) 
Installing formatador (0.2.4) 
Installing rb-fsevent (0.9.3) 
Installing rb-inotify (0.9.1) 
Installing rb-kqueue (0.2.0) 
Installing listen (1.3.0) 
Installing lumberjack (1.0.4) 
Installing method_source (0.8.2) 
Installing slop (3.4.6) 
Installing pry (0.9.12.2) 
Installing thor (0.18.1) 
Installing guard (1.8.2) 
Installing guard-compass (0.0.8) 
Installing multi_json (1.7.9) 
Installing guard-livereload (1.4.0) 
Installing guard-shell (0.5.1) 
Installing oily_png (1.1.0) 
Installing rb-fchange (0.0.6) 
Installing sass-globbing (1.1.0) 
Installing sassy-strings (1.0.0) 
Installing singularitygs (1.1.2) 
Installing susy (1.0.9) 
Installing toolkit (1.3.7) 
Installing yajl-ruby (1.1.0) 
Using bundler (1.3.5) 
Your bundle is complete! 

今回は「ffi(1.9.0)をインストールする」に問題はありません。それから、ruby 1.9.3を削除しました。私はコンパス/サス/サッシのためだけに使用しています.2.0.0でも動作します。

Sams-MacBook-Pro:~ Sam$ ruby -v 
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0] 
Sams-MacBook-Pro:~ Sam$ cd drupal/ecoop/sites/default/themes/ecoop/ 
ruby-1.9.3-p448 is not installed. 

To install do: 'rvm install ruby-1.9.3-p448' <<<<<< no thanks 

Sams-MacBook-Pro:ecoop Sam$ compass watch 
>>> Change detected at 12:35:09 to: reset.scss 
overwrite css/reset.css 
overwrite css/styles.css 
>>> Compass is watching for changes. Press Ctrl-C to Stop. 

現在、私のプロジェクトではうまく動作します。新しいバージョンのRubyを使用しても結果は十分ではありませんが、十分な時間が失われています。何らかの設計をする必要があります。明らかに、これは1.9.3を必要とする人を助けないので、ffiがインストールされない理由についてのオリジナルの質問はまだ解決されていません。

+1

私は別のマシンで同じ問題を抱えています。私の1台のマシンは正常に動作し、2台目のマシンは基本的に同じ方法でセットアップされます。これを他の人々のマシンに複製しようとしているので、本当にただ1.9.3に固執したいと思っていました。 ffiの宝石をそれにインストールしようとしても、同じ "ネイティブエクステンションを作成できませんでした"という独自の結果が得られます。すべてのxcodeとコマンドラインツールが更新されました。homebrew updatedなど – humanaut

答えて

0

gcc46がインストールされていることを確認する必要があります。

brew install gcc46を試してからbundle installを再実行してください。

+0

Alexに感謝します。私は今ルビー2.0.0p247を使用していますが、これを元に戻って旧バージョンをインストールしようとしていないので、これが解決するかどうかは言えません。 – Sam

+2

エラー:gcc46の利用可能な式がありません – humanaut

+1

@briggimusここで同じエラーが発生しました/エラー:gcc46の利用可能な式がありません –

1
Sams-MacBook-Pro:~ Sam$ cd drupal/ecoop/sites/default/themes/ecoop/ 
ruby-1.9.3-p448 is not installed. 

To install do: 'rvm install ruby-1.9.3-p448' <<<<<< no thanks 

あなたの.rubyバージョンファイルは、まだ1.9.3です。

1

私の2セント - よく、タプキニー。

私はバンドルステップ11の前にインストールを実行するときinstall an Omega 4 subtheme in Drupalしようとしながら、この問題に遭遇しました(ガイドに記載されていません...ため息。)

オメガがあることを意味する{{ THEME }}と呼ばれるプレースホルダの負荷を持っていますあなたのカスタムテーマ名に置き換えられました。何とか(私がRubyについて何も知らないので私を許してください!)gemfileにスペースを入れてこの奇妙なプレースホルダを使用しようとしました。

また、宝石を/home/ubuntu/.rvm/gems/[email protected]{{ THEME }}/gemsというフォルダに保存しようとしましたが、これは私には分かりませんでした。それを解決するには

私は次のようでした:

rvm use [email protected] --create 
rvm gemset list 

    gemsets for ruby-1.9.3-p547 (found in /home/ubuntu/.rvm/gems/ruby-1.9.3-p547) 
    (default) 
    global 
    => omega.mysubtheme 
    omega.{{ THEME }} 

bundle install # This now works! 

が、これは誰かに役立ちます願っています!結論として、これは通常、ファイル名スペースの問題です。多くの人がOSXの問題を抱えています。これは、無効な名前の "Macintosh HD"へのパスを解決するためです。

0

通常、この問題が発生した場合、解決策はXcodeが更新されていることを確認することです。

関連する問題