2009-07-20 4 views
4

저는 윈도우 머신에서 일하고 있습니다. 커브 플러그인을 작동 시키려면, 제 컴퓨터에 설치된 컬 라이브러리가 필요하다는 것을 먼저 깨달았습니다. 그래서 제가하고 싶은 일입니다.libcurl 라이브러리를 InstantRails와 함께 사용하려면 어떻게합니까?

나는 curl 라이브러리, curllib 라이브러리를 다운로드하고 c :/curl 및 c :/curllib에 각각 위치 시켰습니다. 환경 변수를 설정하고, curl.exe를 실행할 수 있고 그것은 아름다운 것처럼 작동합니다. 그러나 내 보석은 여전히 ​​다음과 같이 실패합니다.

C:/InstantRails/ruby/bin/ruby.exe extconf.rb install curb 
checking for curl-config... no 
checking for main() in curl.lib... no 
*** 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 
     --srcdir=. 
     --curdir 
     --ruby=C:/InstantRails/ruby/bin/ruby 
     --with-curl-dir 
     --with-curl-include 
     --without-curl-include=${curl-dir}/include 
     --with-curl-lib 
     --without-curl-lib=${curl-dir}/lib 
     --with-curllib 
     --without-curllib 
extconf.rb:9: Can't find libcurl or curl/curl.h (RuntimeError) 

    Try passing --with-curl-dir or --with-curl-lib and --with-curl-include 
    options to extconf. 


Gem files will remain installed in C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/curb-0.4.4.0 for inspection. 
Results logged to C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/curb-0.4.4.0/ext/gem_make.out 

아무도 아이디어가 있습니까?

답변

2

이렇게하면 작업을 완료하는 데 최고의 튜토리얼이됩니다.

http://www.opiumtrail.com/wiki/CurbForWindows/

유의할 것들 :

  • 내가 MSVC6를 사용하여 컴파일, 그래서 추가 단계는 그가 이 적용되지 않은 다른 버전을 사용 에 대해 설명했다.
  • 튜토리얼에 명시된 정확한 보석과 libcurl을 사용해야했습니다.
  • 포함 된 HTTP : NET 라이브러리를 사용하여 필요한 것을 수행 할 수 있습니다. 제 경우에는 해당 라이브러리를 사용하여 알아낼 수 없습니다.
관련 문제