[LRUG] Rake binstub

Frederick Cheung frederick.cheung at gmail.com
Thu Oct 9 03:21:44 PDT 2014




On 9 October 2014 at 11:14:28, Andrew Stewart (boss at airbladesoftware.com) wrote:
> On 9 Oct 2014, at 11:36, Stephen Best wrote:
> > I'm not sure what the virtue of removing the `cd` step from your cronjob is. It sounds 
> way more trouble than it's worth. However this was interesting to think about the answers 
> were great also.
> 
> I was mainly trying to understand why rake couldn't be run from outside its path.
> 
> Most unix programs can be run from wherever you like on the file system; the program figures 
> out its own location, if necessary, and does its thing. In contrast rake needs you to be 
> in the project's top-level directory, or a subdirectory. I've never tried to run rake 
> from outside a project's directory, so I hadn't encountered this constraint before. 
> 


It's not that rake can't be run from anywhere, but that the current directory affects its behaviour. For rake or make this controls where it looks for Makefile/Rakefile, for git it controls where it looks for the .git directory. The current directory can obviously affect what results you can get from a lot of unix programs (ls, rm etc.)

Fred



More information about the Chat mailing list