Forum: Nitro Og NameError

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-26 06:57
(Received via mailing list)
Hello --
  I don't know if this still belongs here or should be sent to the Ogden
list,
but here goes:

In my standalone application, these lines:

require "rubygems"
require "og"

are producing:

/usr/lib/ruby/gems/1.8/gems/og-0.50.0/lib/og/validation.rb:4:
uninitialized
constant Og (NameError)
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from /usr/lib/ruby/gems/1.8/gems/og-0.50.0/lib/og/main.rb:14
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from /usr/lib/ruby/gems/1.8/gems/og-0.50.0/lib/og.rb:1
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require'


In my nitro program, these lines don't have a problem and the
application runs
as expected:

require "rubygems"
require "nitro"; include Nitro
require "og"


This problem didn't exist as of a few weeks ago, likely before I
installed
Nitro and its dependencies via darcs.

Thanks for any help,
Matt
5f65ee21e577b094753cd7d854dc39e4?d=identicon&s=25 Matthew B Gardner (Guest)
on 2007-12-27 12:07
(Received via mailing list)
Just to update this, it looks like the Og module wasn't being declared
before
module Og::Mixin in validation.rb.

require "facets/class_extension"
require "facets/inheritor"

module Og; end
module Og::Mixin

This fixed it for me...should this be posted to Ogden now?

Also, out of curiosity...I have a class Root that seems to be
conflicting with
some other Root (which doesn't seem to be a class) elsewhere -- any idea
where/what it is? I couldn't find it and this wasn't a problem as of a
few
weeks ago.

Thanks,
Matt
This topic is locked and can not be replied to.