Can't run rake task

Hello,

I am following along Josh C.’s ruby kickstart. But when I’m trying to
run a rake task this error is happening:

C:\Ruby192\bin\ruby.exe -e
$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
C:\Ruby192\bin\rake 1:1 rake 1:1 --trace

** Invoke 1:1 (first_time)

** Execute 1:1

ruby -c
‘C:/Users/Nirjhor/RubymineProjects/ruby-kickstart/session1/challenge/1_arithmetic.rb’

Syntax OK

rspec -cr
‘C:/Users/Nirjhor/RubymineProjects/ruby-kickstart/session1/challenge/1_arithmetic.rb’
-r enumerator
‘C:/Users/Nirjhor/RubymineProjects/ruby-kickstart/session1/spec/1.rb’
–fail-fast

rake aborted!

Command failed with status (127): [rspec -cr
'C:/Users/Nirjhor/RubymineProjec…]

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:53:in
`block in create_shell_runner’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in
`call’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in
`sh’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in
`sh’

C:/Users/Nirjhor/RubymineProjects/ruby-kickstart/Rakefile:67:in
`run_spec’

C:/Users/Nirjhor/RubymineProjects/ruby-kickstart/Rakefile:93:in `block
(4 levels) in <top (required)>’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in
`call’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in
`block in execute’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in
`each’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in
`execute’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:158:in
`block in invoke_with_call_chain’

C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in
`invoke_with_call_chain’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:144:in
`invoke’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:112:in
`invoke_task’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in
`block (2 levels) in top_level’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in
`each’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in
`block in top_level’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in
`standard_exception_handling’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:84:in
`top_level’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:62:in
`block in run’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in
`standard_exception_handling’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in
`run’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top
(required)>’

C:/Ruby192/bin/rake:19:in `load’

C:/Ruby192/bin/rake:19:in `<top (required)>’

-e:1:in `load’

-e:1:in `’

Tasks: TOP => 1:1

Process finished with exit code 1

What could be the reason and what is the solution?

Godspeed –

Junayeed Ahnaf N.

Twitter - @Nirjhor http://twitter.com/nirjhor

On Sat, Oct 22, 2011 at 12:40 AM, Junayeed Ahnaf N. <
[email protected]> wrote:

$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\Ruby192\bin\rake
1:1 rake 1:1 --trace

I don’t really understand what this line means, but at the end there, it
looks like you’re typing $ rake 1:1 rake 1:1 --trace which would tell
rake
to run a task named “1:1” and then a task named “rake” and then a task
named
“1:1”

The “1:1” is correct, I have written that task. But the “rake” is not
correct, there is no task named rake.

The correct way to enter it would be $ rake 1:1 where the dollar sign
indicates you are at the command prompt, and type “rake 1:1” just one
time,
not two.

On Sat, Oct 22, 2011 at 9:35 AM, Josh C. [email protected]
wrote:

to run a task named “1:1” and then a task named “rake” and then a task
named
“1:1”

The “1:1” is correct, I have written that task. But the “rake” is not
correct, there is no task named rake.

The correct way to enter it would be $ rake 1:1 where the dollar sign
indicates you are at the command prompt, and type “rake 1:1” just one time,
not two.

This is what it looks like when I run the task (after correctly filling
out
the problem):

https://s3.amazonaws.com/josh.cheek/images/scratch/ruby_kickstart_raketask.png

Okay I almost figured this out. Now one last problem:

Finished in 2.03 seconds
2 examples, 1 failure

Failed examples:

rspec ./session1/spec/2.rb:7 # arithmetic2 should return 5.0 when given
19 , 10
rake aborted!
Command failed with status (1): [rspec -r
‘C:/Users/Nirjhor/RubymineProject…]
C:/Users/Nirjhor/RubymineProjects/ruby-kickstart/Rakefile:67:in
run_spec' C:/Users/Nirjhor/RubymineProjects/ruby-kickstart/Rakefile:93:inblock
(4 levels) in <top (required)>’
-e:1:in load' -e:1:in
Tasks: TOP => 1:2
(See full trace by running task with --trace)

Why this is happening? What task is wrong here? what is the problem on
line 67 & 93??

Yes I accidentally ran rake twice. Sorry for that :expressionless:

On Oct 22, 2011, at 09:16 , Junayeed A. wrote:

rspec ./session1/spec/2.rb:7 # arithmetic2 should return 5.0 when given
19 , 10

The problem is here, not in rake.

Figured it out. Thanks for your assistance thoughFrom: Ryan D.
[email protected]
To: ruby-talk ML [email protected]
Sent: Monday, October 24, 2011 at 2:56 am
Subject: Re: Can’t run rake task

On Oct 22, 2011, at 09:16 , Junayeed A. wrote:

rspec ./session1/spec/2.rb:7 # arithmetic2 should return 5.0 when given

19 , 10

The problem is here, not in rake.