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

I just started learning Rake. I was reading the blog -
http://lukaszwrobel.pl/blog/rake-tutorial.

So I installed first it :

[email protected]:~$ gem install rake
Fetching: rake-10.1.0.gem (100%)
Successfully installed rake-10.1.0
Parsing documentation for rake-10.1.0
Installing ri documentation for rake-10.1.0
Done installing documentation for rake after 2 seconds
1 gem installed

But now I am not being able to run it.

I put the file rakefile.rb, under the directory as -
/home/kirti/Ruby/Rake tasks/.

[email protected]:~$ rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)
/home/kirti/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in eval' /home/kirti/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in
(See full trace by running task with --trace)

Can anyone help me for this ?

[email protected]:~$ rake

This looks like your home folder

you need to enter the directory where you placed the rake file and run
the
rake command.

@harisankar - Thanks for your help!

arup :~$ cd Ruby
arup :~/Ruby$ ls
doc.txt foo nokogiri1 so.rb test test.rb~
doc.txt~ nokogiri Rake_example so.rb~ test.rb tut.html
arup :~/Ruby$ cd Rake_example
arup :~/Ruby/Rake_example$ ls
rakefile.rb
arup :~/Ruby/Rake_example$ rake
Hello World!
arup :~/Ruby/Rake_example$

Any other way to run it, without using cd command to get into the
directory ?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs