# Trouble with package structure

**URL:** <https://www.ruby-forum.com/t/trouble-with-package-structure/133529>\
**Category:** Rails\
**Created:** [April 1, 2008, 11:04am UTC](https://www.ruby-forum.com/t/trouble-with-package-structure/133529 "2008-04-01T11:04:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 1, 2008, 11:04am UTC](https://www.ruby-forum.com/t/trouble-with-package-structure/133529/1 "2008-04-01T11:04:07Z")

</div>

Hi,

I’m writing a library class for my Rails application stored in  
RAILS\_ROOT/lib/wrap. My class looks like this:

class Wrap::ModuleManager

# Code…

end

## Test this class

mmanager = Wrap::ModuleManager.new

I’d like to test this class without having to run it through Rails,  
but when I try and run it using:

$ ruby module\_manager.rb

I get the following error:

module\_manager.rb:5: uninitialized constant Wrap (NameError)

I must be doing something really obvious wrong and this is probably  
due to not enough general Ruby experience. Could anyone help?

Thanks in advance,  
Rhys
