ruby-on-rails - Ruby on Rails : running Typhoeus on Windows 7 (64 bit)

标签 ruby-on-rails typhoeus

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

基本上,它在“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'

最佳答案

对我有用的 (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 版本,因为 Ruby 是 32 位的。 Typhoeus 对 x64 文件没有反应。

希望这会对某人有所帮助。

关于ruby-on-rails - Ruby on Rails : running Typhoeus on Windows 7 (64 bit),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6346741/

相关文章:

ruby /斑疹伤寒 : set ssl_verifypeer global

ruby-on-rails - 密码更改后通过 Devise 自动登录

ruby-on-rails - 如何从rails路由中删除 Controller 名称?

ruby-on-rails - 在 rails 中嵌入 youtube 视频

jquery - 如何将 jQuery Datepicker 连接到我的 Ruby on Rails 表单?

ruby-on-rails - Rspec 主题!改变 before block 的 "position"

ruby-on-rails - Typhoeus 不会关闭 https 连接

ruby-on-rails - 无法从 Ruby 读取大的 json 响应

ruby - 如何在 Ruby HTTP 请求的 URI 中使用方括号 []

ruby - 在使用 ruby​​ 抓取过程中提交登录字段?