Gavin Sinclair wrote:
> All,
> 
> Does anybody have any suggestions for packaging their code into a directory
> structure during development?  Or just code organisation tips generally?
> (Note: by "during development" I mean that I have no intention to release the
> package, nor to "install" it before running it.)

I've grappled with that one too, but was too shy to ask it here :)

I want my working copy of ruby code to show up first on the search path, 
but I want the same code to run on any other ruby box the same as on the 
development system. Also, I want to be able to use the generic 
setup.rb/install.rb, which expect ruby files to be in a lib subdir. 
Here's what I do:

   RUBYLIB=~/ruby/prj/lib:~/ruby/prj:~/ruby

(Actually, only the first term is essential.)

Dir structure:

~/ruby/prj/
            lib/
                project1 -> ../project1/lib/
                project2 -> ../project2/lib/
            project1/
                     lib/
                         foo.rb
            project2/
                     lib/
                         bar.rb

Then all my requires look like:

   require 'project2/bar'

and these work ok in both dev and installed situations.

You just have to remember to create a symlink for each new project.