9

I try to install ruby runtime, rvm, cucumber plugins in Jenkins,

When I am installing ruby runtime plugin, I meet this error:

java.io.IOException: Failed to dynamically deploy this plugin
    at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1328)
    at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install ruby-runtime plugin
    at hudson.PluginManager.dynamicLoad(PluginManager.java:487)
    at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1324)
    ... 5 more
Caused by: java.io.IOException: Failed to initialize
    at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:441)
    at hudson.PluginManager.dynamicLoad(PluginManager.java:478)
    ... 6 more
Caused by: java.lang.ClassCircularityError: org/jruby/RubyClass
    at java.lang.Class.forName0(Native Method)
    ...

How to fix it? Thanks in advance

enter image description here

6 Answers 6

4

It's a known bug. There is a workaround:

in /etc/default/jenkins

-Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true 

JAVA_ARGS="$JAVA_ARGS -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true"

At the moment there is no definitive solution as you can see.

3
  • 1
    Thank you so much! I installed Jenkins in windows. Where can I find these files? I just uploaded a screenshot of my Jenkins folder structure in the question above.
    – Bluesea
    Nov 25, 2015 at 15:02
  • 1
    I thinks it's jenkins.xml in Windows but I'm not sure (did not try it on windows). Sorry for the late reply.
    – lvthillo
    Dec 7, 2015 at 7:10
  • I am running Jenkins as a Tomcat war file. Where can i implement this workaround?
    – kiltek
    Jan 19, 2016 at 9:18
2

On Windows, Adding argument

-Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true

in jenkins.xml file worked for me as @lvthillo stated.

<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true -jar "%BASE%\jenkins.war" --httpPort=8081 --webroot="%BASE%\war"</arguments>
1
  • This is not working for me :( Windows Server 2019 and Jenkins 2.277.1
    – Saibamen
    Mar 22, 2021 at 18:19
1

On OSX I had to edit /Library/Application Support/Jenkins/jenkins-runner.sh

to add these lines at a point after javaArgs was defined

# workaround for ruby runtime install issue
# per http://stackoverflow.com/questions/33883551/error-installing-ruby-runtime-in-jenkins
javaArgs="$javaArgs -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true"

There is probably a more mac-ish way to do this.

Upon rebooting Jenkins, the ruby runtime plugin, which was already downloaded, started working, as did the also-downloaded rvm plugin, which is the one I was after.

1

I solved it by changing java version to 8th. Maybe there is a problem with java 11 compatibility issues. 1- https://www.liquidweb.com/kb/install-java-8-on-centos-7/

2- On Centos delete all ruby plugin in /var/lib/jenkins/plugins

3- download ruby-runtime.hpi plugin from https://updates.jenkins-ci.org/download/plugins/ruby-runtime/

4- Upload Plugin in jenkins /pluginManager/advanced.

0

Adding -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true in jenkins.xml file doesn't work for me (Windows, Jenkins 2.277.1).

So I just deleted all files for ruby-runtime from Plugins folder (you need to shutdown Jenkins service) and start Jenkins again.

0

For me, installing java 8 solved the problem. After that I was able to install the ruby-runtime plugin.

Environment: Debian 10

1
  • It should be ruby though. Oct 18, 2021 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.