From: brabuhr@... Date: 2010-07-24T06:04:49+09:00 Subject: Re: Typical Ruby (non-rails) project structure. On Fri, Jul 23, 2010 at 2:28 PM, Carl Jenkins wrote: > Richard Conroy wrote: >> 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. > > When using them gem structure for example I have something like this. > > new_proj/ >  bin/ >  lib/ >    common/ >      -new_file.rb >  spec/ >  test/ >  -new_test.rb > > In order to test the new_file.rb my new_test.rb must have the path to > the new_file.rb as the require correct? Something like require > '../lib/common/new_file' > > Or is there a different way to do that? Just looked at one of my bones-generated projects: $ cat spec/spec_helper.rb require File.expand_path( File.join(File.dirname(__FILE__), %w[.. lib fooz])) [...]