Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails RubyonRails:在Windows7(64位)上运行Typhous_Ruby On Rails_Typhoeus - Fatal编程技术网

Ruby on rails RubyonRails:在Windows7(64位)上运行Typhous

Ruby on rails RubyonRails:在Windows7(64位)上运行Typhous,ruby-on-rails,typhoeus,Ruby On Rails,Typhoeus,我无法让Typhous gem在我的Windows 7机器上工作 基本上,它在“C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhous-0.2.4/ext/typhous/”中找不到“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

我无法让Typhous gem在我的Windows 7机器上工作

基本上,它在“C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhous-0.2.4/ext/typhous/”中找不到“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'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhous-0.2.4/lib/typhous.rb:10:in
`require':126:指定的模块
找不到-
C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhous-0.2.4/ext/typhous/native.so
(加载错误)来自
C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhous-0.2.4/lib/typhous.rb:10:in
`“从
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in
`要求
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in
`“要求”中的块(2级)
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in
`每一个都来自
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in
`在“请求”中阻止
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in
`每一个都来自
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in
`要求
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler.rb:120:in'require'

如果gem正在寻找
本机文件,那么它可能无法与windows一起工作,
*。因此对于windows来说,
是一个“共享对象”或“动态链接库”文件的*NIX等价物。因此,它可能真的需要
native.dll
,或者是构建在依赖于平台的代码上的gem。看看他们的文档,这只是一个偶然的机会


然后,它再次指出在native.so(LoadError)中发生了一些事情,因此可能它的begin执行,idk

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

首先,您需要从安装。 其次,您需要获取MinGW的curl和development头和库,您可以在我们的邮件列表中找到说明:

记录在案的是,同一篇文章提到了用户试图让gem在Windows上运行是多么的失败,最后他改用了crub

PS:虽然其他人可能会说共享对象的UNIX/POSIX约定也是如此,但Ruby决定用于Windows C-Extensions的扩展是否像Python使用
*.pyd
作为其扩展一样。

对我(Win7 x64)有效的是从名为
下载libcurl.dll(所有版本)的链接下载.dll,在此处找到:

解压后,我从
NoSSL/SSL
目录中获取了.dll文件(这两种方法似乎都有效,我使用
SSL
只是为了确保这一点)。我将文件复制到Ruby的/bin目录中,Typhous工作了

注意:您不能使用x64版本的.dll,因为Ruby是32位的。Typhous对x64文件没有反应

希望这能帮助一些人