Git Product home page Git Product logo

Comments (6)

yyuu avatar yyuu commented on August 30, 2024

Please let me know the version of Jenkins.

from jenkins.rb.

yyuu avatar yyuu commented on August 30, 2024

I confirmed this on Jenkins 1.517 + ruby-runtime 0.11 + rvm plugin 0.4. The cause of this problem is old gem dependency (jenkins-plugin-runtime 0.1.17) of rvm plugin 0.4.

Because the latest master of rvm plugin is using jenkins-plugin-runtime 0.2.3 (latest) at jenkinsci/rvm-plugin@e54486e, install rvm plugin from master should solve this problem. Though, there is another incompatibility issue (class hierarchy changes) between jenkins-plugin-runtime 0.1.17 and 0.2.3. Just upgrading rvm plugin may lose job configurations :(

from jenkins.rb.

evanphx avatar evanphx commented on August 30, 2024

It was Jenkins 1.504. I thought that upgrading the RVM plugin might solve the issue, but 0.4 is the latest released version, leaving me stuck.

from jenkins.rb.

yyuu avatar yyuu commented on August 30, 2024

Yep, rvm plugin 0.4 is the latest release version. The latest development version can only be accessed via github repo.

from jenkins.rb.

yyuu avatar yyuu commented on August 30, 2024

Tested with small script.

#!/usr/bin/env ruby
require "java"
puts(RUBY_DESCRIPTION)
java.lang.System.out.write("hello, world\n")

JRuby 1.6 translates call of write(String) on java.io.PrintStream as call of java.io.PrintStream#print(String).

% ruby j.rb
jruby 1.6.8 (ruby-1.8.7-p357) (2012-09-18 1772b40) (OpenJDK 64-Bit Server VM 1.7.0_21) [linux-amd64-java]
hello, world

JRuby 1.7 doesn't treat so.

% ruby j.rb
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on OpenJDK 64-Bit Server VM 1.7.0_21-b02 [linux-amd64]
NameError: no method 'write' for arguments (org.jruby.RubyString) on Java::JavaIo::PrintStream
  available overloads:
    (int)
    (byte[])
  (root) at j.rb:4

from jenkins.rb.

yyuu avatar yyuu commented on August 30, 2024

Confirmed that setting java_alias on java.io.PrintStream will solve problem on ruby-runtime 0.11+.

require "java"
java_import java.io.PrintStream
class PrintStream
  java_alias(:write, :print, [java.lang.String])
end

from jenkins.rb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.