2011-06-14 78 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

相关问题