开发者

Problem with loading the hpricot gem

I have a problem with loading the hpricot gem. I'm using it in a rake task and put a require "hpricot" in it. But it doesn't load with a error message:no such file to load -- hpricot But I'll see it in my gem list but don't know why the rake task does开发者_Python百科n't recognize it. Does anybody has experience with that kind of problem with the hpricot gem?

output of 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


I solved the problem. I forgot to add the hpricot gem to the gem file of my rails app. After I added the gem to the gemfile and ran a bundle install , everything works fine.


Please try to add require 'rubygems' before requiring hpricot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜