我在Ruby 1.9.2dev在Backtrack 5脚本编写,但当我尝试使用库“htmlentities”解析html实体时遇到了一些问题。红宝石安装和“没有这样的文件加载”
虽然我已经安装了宝石,但无法加载库。 我会告诉你我在控制台具有问题:
[email protected]:~# gem list -d htmlentities
*** LOCAL GEMS ***
htmlentities (4.3.1)
Author: Paul Battley
Homepage: https://github.com/threedaymonk/htmlentities
Installed at: /var/lib/gems/1.9.2
A module for encoding and decoding (X)HTML entities.
[email protected]:~# irb irb(main):001:0> require 'htmlentities' LoadError: no such file to load -- htmlentities
from (irb):1:in `require'
from (irb):1
from /usr/bin/irb:12:in `<main>'
这是我与引入nokogiri有同样的问题。我安装了库
gem install htmlentities
你知道为什么我有这个问题吗?
谢谢。
编辑:
我试着也需要“RubyGems的”以前任何其他要求,但发生在相同的:
我试图要求“RubyGems的”,但正在发生的事情是一样的:
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'htmlentities'
LoadError: no such file to load -- htmlentities
from (irb):2:in `require'
from (irb):2
from /usr/bin/irb:12:in `<main>'
'require'rubygems''? –