On Thu, Jun 24, 2010 at 10:20 PM, Richard Lionheart <NoOne / nowhere.net>wrote:

> Hi,
>
> I tried to invoke rake from a Command Window, with a couple of failures and
> one success.  I haven't consciously done anything to my system to impact
> rake  Any idea what's going on?
>
> First try:
> K:\>rake --trace
> rake aborted!
> No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
> Rakefile.rb)
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in
> `raw_load_rakefile'
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
> `load_rakefile'
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> `standard_exception_handling'
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
> `load_rakefile'
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in
> `run'
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> `standard_exception_handling'
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
> `run'
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
> K:/_Utilities/ruby186-26_rc2/ruby/bin/rake:19:in `load'
> K:/_Utilities/ruby186-26_rc2/ruby/bin/rake:19
>
> Second try:
> K:\_Projects\Ruby\_Rails_Apps\_EIMS\RTS>rake --trace
> rake aborted!
> [snip: same trace]
>
> Third try (success):
> K:\_Projects\Ruby\_Rails_Apps\_EIMS\RTS2>rake --trace
> (in K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS2)
> ** Invoke default (first_time)
> ** Invoke test (first_time)
> ** Execute test
> ** Invoke test:units (first_time)
> ** Invoke db:test:prepare (first_time)
> ** Invoke db:abort_if_pending_migrations (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> ** Execute db:abort_if_pending_migrations
> You have 1 pending migrations:
>  20100624214641 CreateExpenses
> Run "rake db:migrate" to update your database then try again.
>
> In the second attempt, there was a migration in the depths of the RTS
> directory,  but rake failed instead of reporting the migration's existence.
> I can't imagine how this problem occurred.
>
> Thanks in Advance,
> Richard
>
>
>
> --- news://freenews.netfront.net/ - complaints: news / netfront.net ---
>
>
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.

(Think of it as being similar to how Ruby works on your file that ends in
.rb)

Probably you are not in the root directory of your Rails app. Check to make
sure that you are in your app's root directory. Hint: it will have app,
config, db, and public among others. Oh yeah, and a Rakefile ;)