NameError: uninitialized constant RDF #9

Closed
Funfun opened this Issue Apr 27, 2010 · 2 comments

Projects

None yet

2 participants

@Funfun
Funfun commented Apr 27, 2010

After install rdf gem i got error:

NameError: uninitialized contstant RDF

Owner

Sounds like you probably need to require RubyGems before you require RDF.rb:

require 'rubygems'
require 'rdf'

puts RDF::Statement(RDF::URI("http://rubygems.org/gems/rdf"), RDF::DC.title, "RDF.rb").inspect

Usually people set up an environment variable that automatically requires RubyGems for all their Ruby code:

$ export RUBYOPT="-rubygems"

Hope this helps...

Funfun commented May 25, 2010

thanks, it's very helpfull

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment