# Rake plugin fails when Job configured to use (Default) Rake installation.

## Details

• Type: Bug
• Status: Resolved
• Priority: Blocker
• Resolution: Fixed
• Component/s:
• Labels:
None

## Description

after the upgrade to the latest Hudson (1.377) and Rake plugin (1.7) all jobs that are using the Rake plugin with "Rake Version" set to "(Default)" have started failing with:

Started by user xxxx
Building remotely on ci-slave-01
[Core-developing-deploy] $ruby -v D:\DOCUME~1_service\LOCALS~1\Temp\hudson3144810132813567851.rb ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32] Copied 16 artifacts from Core-developing-package #117 FATAL: null java.lang.NullPointerException at hudson.plugins.rake.Rake.perform(Rake.java:122) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.Build$RunnerImpl.build(Build.java:174)
at hudson.model.Build$RunnerImpl.doRun(Build.java:138) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
at hudson.model.Run.run(Run.java:1273)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:137)

Selecting a specific version of Rake fixes this issue in some cases, but in cases where the path to Ruby is different on different boxes (slaves) it may still fail.

Prior to this update, we were using the Default rake installation in most cases, so as long as it was available in the PATH on the slave, it worked.

## Activity

stevenharman created issue -
Hide

Upps, sorry for the regression, I've already fixed the problem and release a new version, 1.7.1.

Thank you!

Show
david_calavera added a comment - Upps, sorry for the regression, I've already fixed the problem and release a new version, 1.7.1. Thank you!
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Hide

Awesome! how long does it typically take for a new release to be published and available for upgrade?

Show
stevenharman added a comment - Awesome! how long does it typically take for a new release to be published and available for upgrade?
Hide

I don't remember how long it takes to rebuild the index. You can download and install it by hand if you need it right now:

Show
david_calavera added a comment - I don't remember how long it takes to rebuild the index. You can download and install it by hand if you need it right now: http://github.com/hudson/rake-plugin/downloads
Hide
vikram jani added a comment -

I am using Rake Plugin 1.7.7 and see this issue. I only have rake and ruby avialable on my slave (windows) machine. Any clue?

Show
vikram jani added a comment - I am using Rake Plugin 1.7.7 and see this issue. I only have rake and ruby avialable on my slave (windows) machine. Any clue?
Hide
john smith added a comment -

I am also using Rake plugin 1.7.7 and see this issue. My machine is also a windows slave.

Show
john smith added a comment - I am also using Rake plugin 1.7.7 and see this issue. My machine is also a windows slave.
Hide
Olivier Dagenais added a comment -

John and Vikram: What version of Java is running on the machines where this happens? I think I narrowed a bug with the same repro steps as this one's title (and a similar work-around: specify a non-default Rake), but with a different root cause. I have reproduced when trying to launch the job on both a Windows master or a Windows slave, and I always get:

[workspace] $rake.bat '"C:\path\to\Jenkins\jobs\jobName\workspace\ruby.exe"' is not recognized as an internal or external command, operable program or batch file. Build step 'Invoke Rake' marked build as failure  Show Olivier Dagenais added a comment - John and Vikram: What version of Java is running on the machines where this happens? I think I narrowed a bug with the same repro steps as this one's title (and a similar work-around: specify a non-default Rake), but with a different root cause. I have reproduced when trying to launch the job on both a Windows master or a Windows slave, and I always get: [workspace]$ rake.bat ' "C:\path\to\Jenkins\jobs\jobName\workspace\ruby.exe" ' is not recognized as an internal or external command, operable program or batch file. Build step 'Invoke Rake' marked build as failure
Hide
Olivier Dagenais added a comment -

FYI, I have created (and submitted a fix for) issue JENKINS-18822 which might interest you.

Show
Olivier Dagenais added a comment - FYI, I have created (and submitted a fix for) issue JENKINS-18822 which might interest you.

## People

• Assignee:
david_calavera
Reporter:
stevenharman