[Rake v 0.8.7] rake gem : rake aborted! No Rakefile found

Hello People,

When I execute “rake gems:refresh_specs” it give me:

$ rake gems:refresh_specs --trace
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2377:in
raw_loa d_rakefile' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2017:in block i
n load_rakefile’
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in
standar d_exception_handling' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2016:in load_ra
kefile’
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2000:in
block i n run' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in standar
d_exception_handling’
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in
run' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in <top
(requir
ed)>’
/usr/bin/rake:19:in load' /usr/bin/rake:19:in

$ ruby -v
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-cygwin]

$ gem -v
1.3.7

$ rake --version
rake, version 0.8.7

$ gem list -d

*** LOCAL GEMS ***

actionmailer (2.3.5)
Author: David Heinemeier H.
Rubyforge: http://rubyforge.org/projects/actionmailer
Homepage: http://www.rubyonrails.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Service layer for easy email delivery and testing.

actionpack (2.3.5)
Author: David Heinemeier H.
Rubyforge: http://rubyforge.org/projects/actionpack
Homepage: http://www.rubyonrails.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Web-flow and rendering framework putting the VC in MVC.

activerecord (2.3.5)
Author: David Heinemeier H.
Rubyforge: http://rubyforge.org/projects/activerecord
Homepage: http://www.rubyonrails.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Implements the ActiveRecord pattern for ORM.

activeresource (2.3.5)
Author: David Heinemeier H.
Rubyforge: http://rubyforge.org/projects/activeresource
Homepage: http://www.rubyonrails.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Think Active Record for web resources.

activesupport (2.3.5)
Author: David Heinemeier H.
Rubyforge: http://rubyforge.org/projects/activesupport
Homepage: http://www.rubyonrails.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Support and utility classes used by the Rails framework.

arrayfields (4.7.4)
Author: Ara T. Howard
Rubyforge: http://rubyforge.org/projects/codeforpeople
Homepage: GitHub - ahoward/arrayfields: allow keyword access to array instances.
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

arrayfields

fattr (2.1.0)
Author: Ara T. Howard
Rubyforge: http://rubyforge.org/projects/codeforpeople
Homepage: GitHub - ahoward/fattr: fattr.rb is a "fatter attr" for ruby and borrows heavily from the metakoans.rb ruby quiz
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

fattr

main (4.2.0)
Author: Ara T. Howard
Rubyforge: http://rubyforge.org/projects/codeforpeople
Homepage: GitHub - ahoward/main: a class factory and dsl for generating command line programs real quick
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

main

mysql (2.8.1)
Author: TOMITA Masahiro
Rubyforge: http://rubyforge.org/projects/mysql-win
Homepage: http://mysql-win.rubyforge.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

This is the MySQL API module for Ruby

rack (1.1.0)
Author: Christian N.
Rubyforge: http://rubyforge.org/projects/rack
Homepage: http://rack.rubyforge.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

a modular Ruby webserver interface

rails (2.3.5)
Author: David Heinemeier H.
Rubyforge: http://rubyforge.org/projects/rails
Homepage: http://www.rubyonrails.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Web-application framework with template engine, control-flow layer,
and ORM.

rake (0.8.7)
Author: Jim W.
Rubyforge: http://rubyforge.org/projects/rake
Homepage: http://rake.rubyforge.org
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Ruby based make-like utility.

rake-command-completion (0.0.1)
Author: Nicholas S., Saimon M., Err the Blog, Lee M.,
Tyler Rick
Rubyforge: http://rubyforge.org/projects/rake-command-completion
Homepage: http://rake-completion.rubyforge.org/
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Adds bash command-line completion for the rake command.

rake-compiler (0.7.0)
Author: Luis L.
Rubyforge: http://rubyforge.org/projects/rake-compiler
Homepage: GitHub - rake-compiler/rake-compiler: Provide a standard and simplified way to build and package Ruby C and Java extensions using Rake as glue.
License: MIT
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Rake-based Ruby Extension (C, Java) task generator.

rake-dir (0.0.1)
Author:
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Run rake tasks in different directories

Anyone mind help me fix the rake problem?

Thank you.

On Tue, May 18, 2010 at 6:05 AM, Draggy D. [email protected]
wrote:

d_rakefile’
block i /usr/bin/rake:19:in
$ gem list -d

Rubyforge: http://rubyforge.org/projects/activerecord

arrayfields (4.7.4)
Homepage: GitHub - ahoward/fattr: fattr.rb is a "fatter attr" for ruby and borrows heavily from the metakoans.rb ruby quiz
main
Author: Christian N.
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1
Ruby based make-like utility.
rake-compiler (0.7.0)
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Run rake tasks in different directories

Anyone mind help me fix the rake problem?

Thank you.

Posted via http://www.ruby-forum.com/.

Rake works by looking in your dir for a file called rakefile, Rakefile,
rakefile.rb, or Rakefile.rb Your directory doesn’t have one, so there is
no
file for rake to pull in and find your tasks from.

Based on your installed gems, and rake task, I assume you’re working on
a
Rails app. If so, check that you are in the root directory of the rails
app.
If you do this correctly, you will see Rakefile listed among your “$ls”
results.

Here is an example I made up:
$ pwd
~/myapps/myrailsapp/app/models

$ cd …
~/myapps/myrailsapp/app

$ cd …
~/myapps/myrailsapp

$ ls
README app db lib public test
vendor
Rakefile config doc log script tmp

$ rake -T gems
rake gems # List the gems that this rails
application
depends on
rake gems:build # Build any native extensions for
unpacked
gems
rake gems:build:force # Force the build of all gems
rake gems:install # Installs all required gems.
rake gems:refresh_specs # Regenerate gem specifications in
correct
format.
rake gems:unpack # Unpacks all required gems into
vendor/gems.
rake gems:unpack:dependencies # Unpacks all required gems and their
dependencies into vendor/gems.
rake rails:freeze:gems # Lock this application to the current
gems
(by unpacking them into vendor/rails)

$ rake gems:refresh_specs
(in /Users/josh/myapps/myrailsapp)

Hello :smiley:

Thanks guys

I will let you guys know if I encounter the same problem again.

Thank you.

On Tue, May 18, 2010 at 6:05 AM, Draggy D. [email protected]
wrote:

d_rakefile’
block i /usr/bin/rake:19:in
$ gem list -d

Rubyforge: http://rubyforge.org/projects/activerecord

arrayfields (4.7.4)
Homepage: GitHub - ahoward/fattr: fattr.rb is a "fatter attr" for ruby and borrows heavily from the metakoans.rb ruby quiz
main
Author: Christian N.
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1
Ruby based make-like utility.
rake-compiler (0.7.0)
Installed at: /usr/local/ruby/lib/ruby/gems/1.9.1

Run rake tasks in different directories

Anyone mind help me fix the rake problem?

Thank you.

Posted via http://www.ruby-forum.com/.

Also, if you genuinely don’t have a rakefile (ie it got deleted), you
can
create one yourself. ie:

(first, make sure you are in your rails app’s root directory)

$ cat <<‘RAKEFILE_END’ > Rakefile

Add your own tasks in files placed in lib/tasks ending in .rake,

for example lib/tasks/capistrano.rake, and they will automatically be

available to Rake.

require(File.join(File.dirname(FILE), ‘config’, ‘boot’))

require ‘rake’
require ‘rake/testtask’
require ‘rake/rdoctask’

require ‘tasks/rails’
RAKEFILE_END