2013-08-24 8 views
7

होमब्री, एक्सकोड (कमांड लाइन टूल्स के साथ) और libffi के साथ मैकबुक प्रो पर ओएसएक्स 10.8.4 का उपयोग करना।आरवीएम बंडल इंस्टॉल के माध्यम से एफएफआई 1.9.0 स्थापित नहीं कर सकता - ओएसएक्स 10.8.4

मैंने आरवीएम और रूबी-1.9.3-पी 448 स्थापित किया है और ओमेगा.कोको नामक एक रत्न है। एक रत्न है जो इस परियोजना के लिए जरूरी रत्न सूचीबद्ध करता है। हालांकि, मैं उन्हें बंडल की जांच चलाने के बाद स्थापित किया है, नहीं कर सकते हैं:

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) 

सभी अच्छी तरह से जा रहा है, जब तक:

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. 

यह आदेश या तो काम नहीं करता है (मणि ffi -v '1.9 स्थापित .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 जीयूआई के बजाय) कमांड लाइन केवल उपयोग करना चाहता था लेकिन काफी यहाँ अटक गया। किसी भी मदद को सराहा जाएगा, धन्यवाद।

संपादित

तो मैं एक अलग दृष्टिकोण की कोशिश की, मैं शायद सोचा था कि यह है कि संगत नहीं था रूबी का संस्करण था:

rvm install 2.0.0 

तो gemset इस समय गहरे लाल रंग का 2.0.0

का उपयोग कर बनाने के
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)' के साथ कोई समस्या नहीं है। तब मैंने रूबी 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. 

अब मेरी परियोजना के लिए ठीक काम करता है। रूबी के एक नए संस्करण का उपयोग करने के किसी भी परिणाम के बारे में सुनिश्चित नहीं है लेकिन पहले से ही पर्याप्त समय खो गया है, कुछ डिजाइन करने की जरूरत है। जाहिर है, यह किसी ऐसे व्यक्ति की मदद नहीं करेगा जिसकी आवश्यकता है 1.9.3 ताकि मूल क्वेरी क्यों एफएफआई इंस्टॉल नहीं की जाएगी, अभी तक संबोधित नहीं किया जाना चाहिए।

+1

मुझे एक और मशीन पर एक ही समस्या है। मेरी एक मशीन ठीक काम करती है, और दूसरी मशीन मूल रूप से वैसे ही सेटअप होती है। वास्तव में सिर्फ 1.9.3 तक रहना चाहता था क्योंकि मैं इसे अन्य लोगों की मशीनों पर दोहराने का प्रयास कर रहा हूं। यहां तक ​​कि एफएफआई मणि को अपने स्वयं के परिणामों पर "मूल एक्सटेंशन बनाने में विफल" में स्थापित करने का प्रयास भी किया जा रहा है। सभी एक्सकोड और कमांड लाइन टूल्स अपडेट किए गए .. होमब्री अपडेटेड इत्यादि। – humanaut

उत्तर

0

आपको यह सुनिश्चित करने की ज़रूरत है कि आपके पास gcc46 स्थापित है।

brew install gcc46 आज़माएं और फिर bundle install पुन: चलाएं।

+0

धन्यवाद एलेक्स। मैं अब रूबी 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-version फ़ाइल अभी भी 1.9.3 है।

1

मेरे दो सेंट- ठीक है, tuppenny।

मैं जबकि जब बंडल चल रहा 11 कदम से पहले स्थापित install an Omega 4 subtheme in Drupal करने की कोशिश कर इस मुद्दे का सामना करना पड़ा है (जो गाइड में उल्लेख नहीं है ... आह।)

ओमेगा प्लेसहोल्डर {{ THEME }} कहा जाता है का भार जो के लिए हैं है आपके कस्टम थीम नाम से प्रतिस्थापित किया गया- और किसी भी तरह (मुझे माफ़ कर दो क्योंकि मुझे रूबी के बारे में कुछ नहीं पता!) इस रत्न में रिक्त स्थान के साथ इस अजीब प्लेसहोल्डर का उपयोग करने की कोशिश की।

यह रत्नों को /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! 

आशा इस कोई मदद करता है! निष्कर्ष यह है कि यह आमतौर पर फ़ाइल नाम रिक्त स्थान के साथ एक समस्या है- बहुत से लोगों को ओएसएक्स के साथ समस्याएं होती हैं क्योंकि यह "मैकिंतोश एचडी" के पथ को हल करती है जो एक अवैध नाम है।

0

आमतौर पर जब मुझे यह समस्या होती है तो समाधान यह सुनिश्चित करना है कि एक्सकोड अपडेट हो।

संबंधित मुद्दे