Error with Rake

Hello,

While I’m testing something and there’s an error in my program after
defining the error the compiler is displaying this:

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:in `block
(4 levels) in <top (required)>’

-e:1:in `load’

-e:1:in `’

Tasks: TOP => 1:2

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

Here’s it with trace:

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:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/file_utils.rb:53:in
`block in create_shell_runner’

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

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

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/file_utils_ext.rb:39: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.3.beta.1/lib/rake/task.rb:205:in
`call’

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

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

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

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/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.3.beta.1/lib/rake/task.rb:151:in
`invoke_with_call_chain’

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

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/application.rb:114:in
`invoke_task’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/application.rb:93:in
`block in top_level’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/application.rb:93:in
`each’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/application.rb:93:in
`top_level’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/application.rb:66:in
`block in run’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/application.rb:131:in
`standard_exception_handling’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/lib/rake/application.rb:63:in
`run’

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.3.beta.1/bin/rake:37: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:2

What could be the solution?

Godspeed –

Junayeed Ahnaf N.

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

On Sat, Oct 22, 2011 at 10:59 AM, Junayeed Ahnaf N.
[email protected] wrote:

Hello,

While Im testing something and theres an error in my program after defining the
error the compiler is displaying this:

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

That means something is wrong with the way you implemented
arithmetic2. Take a look at that to see how you can make it return
5.0.

Eric C. wrote in post #1027928:

On Sat, Oct 22, 2011 at 10:59 AM, Junayeed Ahnaf N.
[email protected] wrote:

Hello,

While Im testing something and theres an error in my program after defining the
error the compiler is displaying this:

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

That means something is wrong with the way you implemented
arithmetic2. Take a look at that to see how you can make it return
5.0.

I know there’s a problem in arithmetic2 because I wanted to have the
problem (without that , it exits with return code 0). All I want to know
is this message:

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)

after indicating the problem is general or this should not happen?

Junayeed A. wrote in post #1027930:

I know there’s a problem in arithmetic2 because I wanted to have the
problem (without that , it exits with return code 0). All I want to know
is this message:

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)

after indicating the problem is general or this should not happen?

Definitely you should state what is your question better since was not
clear for anyone reading this thread.

Yes, is normal that rake, when executing a child process (ruby rspec in
this case) will generate “rake aborted!” and “Command failed with status
(X)”

The backtrace is due you executed rake with --trace option, which will
not give you the backtrace of the child process but the Rake invocation
itself.


Luis L.

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