From: Richard Conroy Date: 2010-07-24T03:13:07+09:00 Subject: Re: Typical Ruby (non-rails) project structure. --0015175cd4507c68d6048c11fc0d Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jul 22, 2010 at 6:41 PM, Carl Jenkins wrote: > What is/are the best-practice(s) for a Ruby project structure? > Use the gem structure. Its pretty universal for packaging, structuring and even deploying Ruby projects. Rails projects use their own structure, but its well documented too. > As I am just learning Ruby I put everything in one file but, now I am > learning about Modules etc.. > > In Java, classes where in packages which helped with code organization. > Is there a typical way to layout a Ruby project structure? Note that in Java packages also map 1:1 with the directory structure of the classes, that is quite strict. In Ruby, the hierarchy of namespaces has no implications on how ruby files are loaded. I haven't seen much information, beyond the replies here, that implies any consensus on how these files are structured or named. It is worth researching exactly how 'require' and the load path works in Ruby. It is a bit alien coming from a Java background, but the mechanics of how it works will imply its own best practices. -- http://richardconroy.blogspot.com --0015175cd4507c68d6048c11fc0d--