Error When Running Rake in TeamCity

Hi,

First of all I hope I am in the right community. If not, I apologize in advance.

I am trying to configure a build configuration with a build step that uses TeamCity's Rake runner to run our Ruby Acceptance Tests. When running the Rake task from the Command Line, it works fine, but when running it using TeamCity's Rake runner, I keep getting the error below.

When I looked into the rake_ext.rb file, it looks like TeamCity is using RAKEVERSION 0.7.3 - 0.8.3. Not sure if this the cause of the problem.

I wonder if anyone came across this issue before, please kindly share it or point me in the right direction.

Much appriciated.
Quan




[14:47:12][Execute cuke_ci_dev] element size differs (3 should be 2) (IndexError)
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/table.rb:79:in `transpose'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/table.rb:79:in `initialize'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/outline_table.rb:5:in `initialize'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/scenario_outline.rb:49:in `new'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/scenario_outline.rb:49:in `block in init'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/scenario_outline.rb:38:in `map'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/scenario_outline.rb:38:in `init'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/feature.rb:26:in `block in init'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/feature.rb:25:in `each'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/feature.rb:25:in `init'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/feature.rb:37:in `accept'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:20:in `block in visit_feature'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:19:in `visit_feature'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb:29:in `block in accept'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb:17:in `each'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb:17:in `each'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb:28:in `accept'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:14:in `block in visit_features'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:13:in `visit_features'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime.rb:46:in `run!'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/cli/main.rb:43:in `execute!'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/cli/main.rb:20:in `execute'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/bin/cucumber:14:in `<top (required)>'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/bin/cucumber:23:in `load'
[14:47:12][Execute cuke_ci_dev] C:/Ruby193/bin/cucumber:23:in `<main>'
[14:47:12][Execute cuke_ci_dev]
[14:47:12][Execute cuke_ci_dev] RuntimeError: Command failed with status (1): [C:/Ruby193/bin/ruby -S bundle exec cucumbe...]
Stacktrace:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/rake/task.rb:104:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/rake/task.rb:193:in `block in define_task'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:262:in `block in execute'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:90:in `target_exception_handling'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:268:in `execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:235:in `block in my_invoke_with_call_chain'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:90:in `target_exception_handling'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:234:in `my_invoke_with_call_chain'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:314:in `standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:314:in `standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:179:in `run'
D:/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rakerunner.rb:40:in `<main>'
[14:47:12][Execute cuke_ci_dev]
[14:47:12][Invoke cuke_ci_dev]
[14:47:12][Step 3/3]
[14:47:12][Step 3/3] Rake aborted!
[14:47:12][Step 3/3] Process exited with code 1
[14:47:12][Step 3/3] Step Run Integration Tests (Rake) failed
[14:47:12]Publishing internal artifacts
[14:47:12]Build finished

1 comment
Comment actions Permalink

Hi Quan,

What version of TeamCity do you use?
Is "bundle exec" checkbox enabled in Rake-Runner build step?
It will be also nice to see all build configuration settings.

Please paste the failing feature in a gist.github.com or pastie.org.

0

Please sign in to leave a comment.