[LRUG] Rake binstub

Frederick Cheung frederick.cheung at gmail.com
Wed Oct 8 06:10:26 PDT 2014


 


On 8 October 2014 at 14:00:45, Andrew Stewart (boss at airbladesoftware.com) wrote:
> Hello!
>  
> For a long time I have had on my server a cronjob which runs a rake task:
>  
> 42 * * * * RAILS_ENV=production cd /path/to/my/app && bundle exec rake blah
>  
> Recently I decided to get with the program and use a binstub instead:
>  
> 42 * * * * RAILS_ENV=production /path/to/my/app/bin/rake blah
>  
> But it fails with: "rake aborted! No Rakefile found". Naturally there is a Rakefile at  
> /path/to/my/app.
>  
> My rake binstub is the one that comes with Rails 4:
>  
> https://github.com/rails/rails/commit/009873aec89a4b843b41accf616b42b7a9917ba8#diff-15  


I don't think this is related to binstubs at all - when you invoke rake it looks through it's searchpath for rakefiles, which includes the current directory (& it may go up the directory tree), but not "the grandparent of the path where the binstub is installed"

Fred





More information about the Chat mailing list