Ruby scrapi不';我看不到整洁的图书馆

Ruby scrapi不';我看不到整洁的图书馆,ruby,windows-7,tidy,Ruby,Windows 7,Tidy,我有一个简单的ruby文件,可以从沃尔玛的网站上削价出售。我做了一个gem安装scrapi和一个gem安装tidy。在windows 7设备上运行代码时,出现以下错误: 错误 看起来它找不到整洁的图书馆,所以我把它放在我的路径上: Path=C:\Ruby193\lib\ruby\gems\1.9.1\gems\tidy\u ffi-0.1.5\lib;C:\Ruby193\lib\ruby\gems\1.9.1\gems\tidy-1.1.2\lib 但它仍然抛出了同样的找不到tidy lib

我有一个简单的ruby文件,可以从沃尔玛的网站上削价出售。我做了一个gem安装scrapi和一个gem安装tidy。在windows 7设备上运行代码时,出现以下错误:

错误 看起来它找不到整洁的图书馆,所以我把它放在我的路径上:

Path=C:\Ruby193\lib\ruby\gems\1.9.1\gems\tidy\u ffi-0.1.5\lib;C:\Ruby193\lib\ruby\gems\1.9.1\gems\tidy-1.1.2\lib

但它仍然抛出了同样的找不到tidy libs的错误

提前感谢你的帮助

代码
我有完全相同的问题,但在Linux上

这与reader.rb中的find_tidy函数有关——不知何故,它无法找到库。我刚刚去评论了这句话,它现在运行良好

      # Make sure the Tidy path is set and always apply the default
      # options (these only control things like errors, output type).
      # find_tidy
      options = (options || {}).update(TIDY_OPTIONS)

如果您确信系统中有整洁的库,请尝试使用它。

我在mac上也遇到了同样的问题

攻击性代码位于reader.rb文件的第204行。在您喜爱的编辑器中打开它:

atom/usr/local/lib/ruby/gems/2.2.0/gems/scrapi-2.0.0/lib/scraper/reader.rb


就像前面的回答说的那样,把它评论出来。在那之后效果很好

您可能应该使用mechanize。不应该有任何整洁的必要。
require 'rubygems'
require 'scrapi'
require 'tidy'

scraper = Scraper.define do
process "div.firstRow div.priceAvail>div>div.PriceCompare>div.BodyS", :price => :text
result :price
end

url = URI.parse("http://www.walmart.com/search/search-ng.do?search_constraint=0&ic=48_0&search_query=LOST+third+season&Find.x=17&Find.y=1&Find=Find")
puts scraper.scrape(url)
      # Make sure the Tidy path is set and always apply the default
      # options (these only control things like errors, output type).
      # find_tidy
      options = (options || {}).update(TIDY_OPTIONS)