【发布时间】:2010-10-21 23:30:44
【问题描述】:
我有一个在 ruby 中运行良好的两行脚本。我把它移到haml并得到错误
NameError at /
uninitialized constant Tilt::CompileSite::Nokogiri
haml 代码:
%td
- @doc = Nokogiri::XML(File.open(file))
= @doc.xpath("//testsuite").each_with_index {|node,index| "#{index+1}. #{node.attributes["name"].value}<BR>" }
知道如何让它发挥作用吗?
在 Win XP SP3 上使用下面
- ruby 1.8.7(2010-08-16 补丁级别 302)[i386-mingw32]
- nokogiri (1.4.3.1 x86-mingw32)
- 西纳特拉 (1.0)
- 薄 (1.2.7 x86-mswin32)
【问题讨论】: