Bluesea
Bluesea

Reputation: 135

Error Installing ruby runtime in Jenkins

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

Upvotes: 9

Views: 11714

Answers (6)

Kouchner
Kouchner

Reputation: 1

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

Environment: Debian 10

Upvotes: 0

Mohammad reza Saberi
Mohammad reza Saberi

Reputation: 87

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.

Upvotes: 1

Saibamen
Saibamen

Reputation: 648

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.

Upvotes: 0

Shubham Khandare
Shubham Khandare

Reputation: 135

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>

Upvotes: 2

Dave Hildebrandt
Dave Hildebrandt

Reputation: 11

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.

Upvotes: 1

lvthillo
lvthillo

Reputation: 30723

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.

Upvotes: 4

Related Questions