Forum: Ruby on Rails rake aborated

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B1dde9fd4169ba3372486259b5f7a606?d=identicon&s=25 Rachita Dangare (rachita)
on 2014-06-02 15:24
Hi

I have installed gem install rake on my machine.
but when I run command rake

C:\Ruby193\lib\ruby\gems\1.9.1>rake

it gives error message as

rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)

(See full trace by running task with --trace)

kindly help me.

Thanks,
Rachita
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2014-06-02 15:31
(Received via mailing list)
This is normal. You need to run Rake from within the same folder as a
Rakefile, as the error indicates.

Make sure that your PATH is set to include the folder where rake lives,
so that you can type the command from anywhere (not a fully-qualified
path to the executable as you seem to have done here) and it will pick
up the current folder as its working environment.

Walter
Ef3aa7f7e577ea8cd620462724ddf73b?d=identicon&s=25 Rob Biedenharn (Guest)
on 2014-06-02 15:56
(Received via mailing list)
On 2014-Jun-2, at 09:30 , Walter Lee Davis <waltd@wdstudio.com> wrote:

> This is normal. You need to run Rake from within the same folder as a Rakefile,
as the error indicates.
>
> Make sure that your PATH is set to include the folder where rake lives, so that
you can type the command from anywhere (not a fully-qualified path to the
executable as you seem to have done here) and it will pick up the current folder
as its working environment.
>
> Walter

Actually, rake will search "upwards" in the directory structure to find
a Rakefile (with any of the names indicated) and then the tasks will be
executed with the current directory set to where the Rakefile was found.

This allows you to be in a subdirectory of a project and still issue the
rake commands. Of course, now that Rails expects you to have ./bin in
your PATH, finding the rake executable is a bit more complicated than it
used to be.

-Rob
This topic is locked and can not be replied to.