From: Tom Cloyd Date: 2009-02-15T02:10:25+09:00 Subject: Re: simple ruby project layout question David Masover wrote: > Tom Cloyd wrote: >> So, in the Ruby world, \bin simply means "whatever I'm using to >> launch my program", if it's used at all, right? And "\bin" is simply >> an anachronism - has always been done that way? > > Right -- and it's not unique to Ruby either. > > From your use of backslashes, I'm guessing you're on Windows, so I can > see your confusion. On Unix, quite often you find shell scripts in > various bin directories. A few examples from my system: /bin/which, > /usr/bin/git-svn, etc. > > I think the reason it's done this way is that once upon a time, most > or all of the files in those system directories were binary > executables. People probably started putting scripts there because it > was already in the PATH anyway, and it makes sense -- in the above > example, all the user really cares about is git-svn is another git > command, so to be consistent, why not put all of Git together? Even if > most commands are binary, but some are Perl scripts? > > So, in the Ruby world, bin is just "executables", binary or otherwise, > as distinct from lib, where you would find library code. Both are ruby > files, but bin/foo you might actually expect to set executable and run > as a command, whereas if you did the same to lib/foo.rb, it probably > wouldn't do anything. > > James, David, thanks! Just wanted to make sure I understood. Sad story: those backslashes were a slip. I've been off Windows for almost a year. It's been a long night, week, life. I'm tired. I was also trying to get past my first Bash script, and get Cucumber/RSpec based testing going, and I'm a bit boggled. For 15 min. I simply could NOT get a very simple bash script to launch 'cause I was invoking ".\script-name". When I finally caught the problem and flipped the backslash, I felt pretty foolish. Not the first time, though! t. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 << tc@tomcloyd.com >> (email) << TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~