views:

10

answers:

1

Hi,

I've recently downloaded a ruby extension (Nokogiri) using the gem install command and I would like to use it outside rails, in a small script I'm writing. When I use it in rails, it works perfectly, but how to load it outside rails? Which files should I need to 'require'? (I don't seem to find the downloaded source)

Thank you if you can help me.

+1  A: 

See this guide for using nokogiri.

Basically you just do

require 'rubygems'
require 'nokogiri'

and you're set up.

There's also some useful general information on using gems in ruby code here.

neutrino
Thanks, that worked pretty well! I'm going to take a look on the reference you gave me.
Renan