Re: simple ruby project layout question
- From: David Masover <ninja@xxxxxxxxxxxx>
- Date: Sat, 14 Feb 2009 11:44:10 -0500
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.
.
- Follow-Ups:
- Re: simple ruby project layout question
- From: Joel VanderWerf
- Re: simple ruby project layout question
- From: Tom Cloyd
- Re: simple ruby project layout question
- References:
- simple ruby project layout question
- From: Tom Cloyd
- simple ruby project layout question
- Prev by Date: changing email settings
- Next by Date: Re: Error handling in Ruby scripts
- Previous by thread: Re: simple ruby project layout question
- Next by thread: Re: simple ruby project layout question
- Index(es):
Relevant Pages
|