I recently wrote a nice module that I want to use in my rails app. It
consists of a few files in a directory that I have places in the lib
directory. It looks like this:
/lib/KMLTools/foo.rb, bar.rb, baz.rb
Some of these files load each other and I finally got those to work by
using the File.dirname(FILE) trick. When I simply require the file
into my controller, everything is fine, but as soon as i try to create
a new instance of the class i wrote using this code:
d = KMLTools::Document.new()
I get the following error:
NameError in File#save
uninitialized constant KMLTools
This error occured while loading the following files:
Now, there is no file kml_tools.rb, and i am not sure where rails is
getting this file name.
I know i should probably make a gem out of the library i wrote, but I
am not sure if dreamhost lets you install gems.
Does anyone have any suggestions or fixes I could use?
I’ve been trying to figure this out since yesterday and I am really
stymied, any help would be greatly appreciated