From: "Christoffer Lernö" Date: 2008-04-22T19:45:18+09:00 Subject: How can I organize my project in the best way? I'm writing a server for a networked game using ruby, but I keep running into issues when organizing them. Basically I have a structure looking a bit like this: lib/ testclient/ gamemodel/ gamecommands/ server/ utils/ test/ gamemodel/ gamecommands/ server/ utils/ The problem is the paths for the requires. For a test in say test/gamemodel, I need to require something like ../../lib/gamemodel/ But when running the same test from some test_all.rb in /test, the correct require is of course ../lib/gamemodel/ (The natural way would have been to simply write require ) It is possible to fix this problem by appending to the load path, but this means rows of duplicate code in every test file. The problem naturally extends to the lib where you also have to decide where the code supposedly is run from. Any suggestions on neat ways of solving this problem or are there perhaps packages available to make this work automatically? /Christoffer