我在加载 hpricot gem 时遇到问题。我在 rake 任务中使用它并放入require "hpricot"
其中。但它不会加载错误消息:no such file to load -- hpricot
但我会在我的 gem 列表中看到它,但不知道为什么 rake 任务无法识别它。有人对 hpricot gem 的这种问题有经验吗?
输出gem list -d hpricot
:
*** LOCAL GEMS ***
hpricot (0.8.3)
Author: why the lucky stiff
Rubyforge: http://rubyforge.org/projects/hobix
Homepage: http://code.whytheluckystiff.net/hpricot/
Installed at: /Library/Ruby/Gems/1.8
a swift, liberal HTML parser with a fantastic lib