首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ruby on Rails:在Windows 7 (64位)上运行Typhoeus

Ruby on Rails:在Windows 7 (64位)上运行Typhoeus
EN

Stack Overflow用户
提问于 2011-06-15 00:21:36
回答 3查看 1.7K关注 0票数 5

我无法让Typhoeus gem在我的Windows7机器上工作。

基本上,它在"C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/ext/typhoeus/".中找不到"native.so“文件我该如何解决这个问题?

代码语言:javascript
复制
 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'
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2011-06-15 03:42:09

问题似乎是typhoeus需要curl作为开发库才能成功编译它的native.so扩展。

首先,您需要从downloads page安装RubyInstaller DevKit。其次,您需要获取用于MinGW的curl和开发头文件和库,您可以在我们的邮件列表中找到相关说明:

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

根据记录,同样的帖子提到,用户试图让gem在Windows上工作是多么失败,他结束了切换到抑制。

PS:虽然其他人可能会说*.so是UNIX/POSIX共享对象的约定,但它是Ruby决定用于Windows C扩展的扩展,就像Python使用*.pyd进行扩展一样。

票数 1
EN

Stack Overflow用户

发布于 2014-03-07 05:55:48

对我(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就起作用了。

注意:你不能使用.dll的x64版本,因为它是32位的。伤寒对x64文件没有反应。

希望这能帮助到一些人。

票数 3
EN

Stack Overflow用户

发布于 2011-06-15 00:25:49

如果gem正在寻找native.so,那么它可能不适用于windows,*.so是windows *.dll的*NIX等价物,它是一个“共享对象”或“动态链接库”文件。因此,它可能真的需要native.dll,或者是构建在平台相关代码上的gem。看看他们的文件,这只是胡说八道。

然后,它又说在native.so ( LoadError)中发生了一些事情,所以可能它的begin executed,idk

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6346741

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档