2015-01-04 11 views
9

मैं मणि 'sinatra-websocket' स्थापित करने की कोशिश की स्थापित करने के लिए है, लेकिन जब मैं gem install sinatra-websocket भाग गया, मैं यह त्रुटि ...रत्न स्थापना त्रुटि: आप विकास उपकरण पहले

ERROR: Failed to build gem native extension

मिला ... के साथ ...

C:/Ruby193/bin/ruby.exe extconf.rb 
checking for main() in -lc... *** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
    --with-opt-dir 
    --without-opt-dir 
    --with-opt-include 
    --without-opt-include=${opt-dir}/include 
    --with-opt-lib 
    --without-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=C:/Ruby193/bin/ruby 
    --with-thin_parser-dir 
    --without-thin_parser-dir 
    --with-thin_parser-include 
    --without-thin_parser-include=${thin_parser-dir}/include 
    --with-thin_parser-lib 
    --without-thin_parser-lib=${thin_parser-dir}/lib 
    --with-clib 
    --without-clib 
C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:476:in `try_link' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:619:in `try_func' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:845:in `block in have_library' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' 
    from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:840:in `have_library' 
    from extconf.rb:4:in `<main>' 

यहाँ C:\Ruby193\lib\ruby\gems\1.9.1\gems\thin-1.6.3\ext\thin_parser में mkmf फ़ाइल लग रहा है जैसे:

"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I. -DFD_SETSIZE=2048 -DFD_SETSIZE=2048 -O3 -fno-omit-frame-pointer -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby193/lib -L. -march=i486 -lmsvcrt-ruby191 -lshell32 -lws2_32 -limagehlp -lshlwapi " 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <winsock2.h> 
4: #include <windows.h> 
5: int main(int argc, char **argv) 
6: { 
7: return 0; 
8: } 
/* end */ 

मैं विंडोज 7 का उपयोग कर रहा हूं।

मुझे त्रुटि क्यों मिल रही है? एक पंक्ति है "मेकफ़ाइल नहीं बना सका ...", लेकिन क्या यह प्रासंगिक है?

xcode-select --install 

Xcode डेवलपर टूल स्थापित करने के लिए:

+0

mkmf.log फ़ाइल मणि की स्थापना निर्देशिका के नीचे पाया जा सकता है। – Emanuel

+0

@ siaw23 मैंने फ़ाइल की सामग्री को जोड़ा है –

+0

क्या आपके पास सी संकलक स्थापित है? – iain

उत्तर

20

आप चलाना है? आप माणिक के लिए DevTools भूल रहे हैं की तरह

+14

मुझे नहीं लगता कि त्रुटि में संदर्भित "विकास उपकरण" को एक्सकोड के साथ कुछ भी करना है, विशेष रूप से यह विंडोज पर विचार करना है। –

+3

मैक (मैवरिक्स) पर मेरे लिए यह काम। धन्यवाद – Liko

+0

मैं एक नई मशीन में चले गए और एक्सकोड के लिए एक अलग स्थापित के रूप में एक्सकोड कमांड लाइन टूल्स के बारे में भूल गया। इससे धन्यवाद मिली। मैं 'मणि इंस्टॉल प्यूमा' –

10

लग रहा है।

आप उन्हें यहाँ प्राप्त कर सकते: http://rubyinstaller.org/downloads/ बस "डेवलपमेंट किट" के लिए नीचे स्क्रॉल।

डाउनलोड करें और निकालने कि कहीं भी करने के लिए आप चाहते हैं। कमांड प्रॉम्प्ट में फ़ोल्डर खोलें और ruby dk.rb init चलाएं। यह आपके रूबी इंस्टॉलेशन का विवरण देने वाली कॉन्फ़िगरेशन फ़ाइल बनाएगा। अपनी रूबी स्थापना के पथों की पुष्टि करने के लिए जारी रखने से पहले इस कॉन्फ़िगरेशन फ़ाइल को सही करें।

अब ruby dk.rb install चलाते हैं। यह विकास किट स्थापित करेगा।

पुनः प्रारंभ कमांड प्रॉम्प्ट, और मणि फिर से स्थापित करने का प्रयास।

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