I’m trying to get the sanitize gem up and running. I’ve installed sanitize and nokogiri 1.3.3 as required, but when I try and use it in my application_helper.rb:
require 'rubygems'
require 'sanitize'
I get the error:
MissingSourceFile
no such file to load -- sanitize
RAILS_ROOT: C:/Ruby/GWS
(stack trace)
This error occurred while loading the following files:
sanitize
I also get the error if I require nokogiri, but I don’t if I require another gem such as rmagick.
I’ve tried uninstalling and reinstalling both nokogiri and santitize, but with no luck.
Update:
If I run the require command from irb I get an error about racc not being found. If I try to install racc I get the error message at error while installing ruby gem
Here’s how I fixed it.
Add the following to config/environment.rb
then run
(I also had to uninstall and reinstall the gems but that may have been due to problems with one of my gem sources which I had added after the original issue arose).