2011-06-14 79 views
4

我無法讓Typhoeus gem在我的Windows 7機器上工作。Ruby on Rails:在Windows 7上運行Typhoeus(64位)

基本上,它在「C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/ext/typhoeus/」中找不到「native.so」文件。我該如何解決?

C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/lib/typhoeus.rb:10:in 
`require': 126: The specified module 
could not be found. - 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/ext/typhoeus/native.so 
(LoadError) from 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/lib/typhoeus.rb:10:in 
`<top (required)>'  from 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in 
`require' from 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in 
`block (2 levels) in require' from 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in 
`each'  from 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in 
`block in require'  from 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in 
`each'  from 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in 
`require' from 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler.rb:120:in`require' 

回答

1

的問題似乎是百頭巨怪需要捲曲的開發庫編譯成功是native.so擴展。

首先您需要從downloads page安裝RubyInstaller DevKit。 其次,你將需要得到捲曲和開發頭文件和庫MinGW的,你可以找到我們的郵件列表上的說明:

http://groups.google.com/group/rubyinstaller/browse_thread/thread/c8a4bdb6663cbf7c

的記錄,同樣的職位提到如何失敗是用戶試圖讓寶石在Windows上工作,他結束了轉向遏制。 PS:其他人可能會說* .so是共享對象的UNIX/POSIX約定,是Ruby決定用於Windows C-Extensions的擴展,就像Python使用*.pyd來擴展它們一樣。

0

如果創業板正在尋找native.so那麼它可能無法工作與Windows,*.so是* NIX相當於*.dll一個「共享對象」或「動態鏈接庫」文件窗口。所以它可能真的需要native.dll,或者是構建在平臺相關代碼上的gem。看看他們的文檔,這只是一個黑暗中的鏡頭。

然後再次,它說在native.so(LoadError),所以也許它開始執行的事情發生了,IDK的

3

對我而言(Win7 x64)有效的方法是從鏈接Download libcurl.dll (all versions) only下載.dll,在此處找到:http://www.paehl.com/open_source/?CURL_7.35.0

解壓縮後,我從NoSSL/SSL目錄中取得了.dll文件(似乎可以正常工作,我只是確信地使用了SSL)。我將文件複製到Ruby的/ bin目錄,Typhoeus工作。

注意:因爲Ruby是32位的,所以不能使用.dll的x64版本。 Typhoeus沒有對x64文件做出反應。

希望這會幫助別人。

+0

這個作品應該是被接受的答案 – peter 2014-03-20 18:25:34

相關問題