简体   繁体   中英

LoadError: no such file to load — htmlentities

I'm scripting with Ruby 1.8.7 but I get some issues when try to parse html entities with the library "htmlentities".

I cannot load the library although I have installed it withthe gem.Here is the error :

1.8.7 :001 > require 'htmlentities'
LoadError: no such file to load -- htmlentities

This is my gemlist:

actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
bundler (1.2.0)
htmlentities (4.3.1)
rack (1.0.1)
rails (2.3.4)
rake (0.9.2.2)
rubygems-bundler (1.1.0)
rvm (1.11.3.5)
sqlite3 (1.3.6)

Does:

require 'rubygems'
require 'htmlentities'

work?

EDIT: Just noticed you have bundler in the mix. How are you creating the REPL? Are you using a rails console? If so maybe you need to add htmlentities to your Gemfile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM