Typhoeus Windows 安装 [英] Typhoeus Windows installation
问题描述
尝试在 Windows 7 环境中安装 Typhoeus.Gem 安装成功,但在尝试运行简单的 ruby 脚本时:需要'typhoeus'
Tried installing Typhoeus on a Windows 7 environment. Gem installs successfully but when trying to run a simple ruby script:: require 'typhoeus'
Typhoeus.get("www.google.com", verbose: true)
Typhoeus.get("www.google.com", verbose: true)
我收到以下错误::D:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/library.rb:133:in `block in ffi_lib': 无法打开 l(LoadError)url': 找不到指定的模块..无法打开库libcurl.dll":找不到指定的模块..无法打开库libcurl.so.4":找不到指定的模块.
I get the following error:: D:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open l (LoadError)url': The specified module could not be found. . Could not open library 'libcurl.dll': The specified module could not be found. . Could not open library 'libcurl.so.4': The specified module could not be found.
我尝试添加在 curl 网站上的一个软件包中找到的 curl.exe 和 libcurl.dll,但这没有帮助.不知道此时该怎么办.谢谢.
I tried adding curl.exe and libcurl.dll that I found in one of the packages on the curl website but that didn't help. Not sure what to do at this point. Thnks.
推荐答案
似乎已经想通了.如果有人遇到同样的问题,请确保从 curl.haxx.se/download 下载以下软件包.html
Seem to have figured it out. If anyone is having the same issue, make sure to download the following package from curl.haxx.se/download.html
Win32 2000/XP zip 7.34.0 libcurl SSL Günter Knauf 3.34 MB
Win32 2000/XP zip 7.34.0 libcurl SSL Günter Knauf 3.34 MB
将 bin 目录解压到任何位置,并确保将其添加到您的 PATH 中.我还将 .DLL 添加到 PATHEXT reset comp 并且它起作用了.
Extract the bin directory to wherever and make sure to add it to your PATH. I also added .DLL to PATHEXT reset comp and it worked.
这篇关于Typhoeus Windows 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!