Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for jruby-1.7.26 (1.9.3-p551) #77

Closed
Falkor opened this issue May 26, 2017 · 2 comments
Closed

Support for jruby-1.7.26 (1.9.3-p551) #77

Falkor opened this issue May 26, 2017 · 2 comments

Comments

@Falkor
Copy link

Falkor commented May 26, 2017

I would like to use the slack-notifier gem on the latest version of Puppet Servers which embed unfortunately only jruby 1.7.26 (running 1.9.3p551 ruby).

$> puppetserver ruby --version
jruby 1.7.26 (1.9.3p551) 2016-08-26 69763b8 on OpenJDK 64-Bit Server VM 1.8.0_131-b11 +jit [linux-amd64]

So far, slack-notifier fails on this version:

#> puppetserver gem install slack-notifier
Fetching: slack-notifier-2.1.0.gem (100%)
Successfully installed slack-notifier-2.1.0
1 gem installed
#> puppetserver irb
irb(main):001:0> require 'slack-notifier'
SyntaxError: /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/slack-notifier-2.1.0/lib/slack-notifier/util/link_formatter.rb:20: syntax error, unexpected tLABEL
        def initialize string, formats: [:html, :markdown]
                                       ^
        from org/jruby/RubyKernel.java:1040:in `require'
        from /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54:in `require'
        from file:/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/jruby/kernel19/kernel.rb:13:in `require_relative'
        from /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/slack-notifier-2.1.0/lib/slack-notifier.rb:6:in `(root)'
        from org/jruby/RubyKernel.java:1040:in `require'
        from /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
        from /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:128:in `require'
        from org/jruby/RubyKernel.java:1079:in `eval'
        from (irb):1:in `evaluate'
        from org/jruby/RubyKernel.java:1479:in `loop'
        from org/jruby/RubyKernel.java:1242:in `catch'
        from org/jruby/RubyKernel.java:1242:in `catch'
        from org/jruby/RubyKernel.java:1059:in `load'
        from /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/bin/irb:17:in `(root)'
        from jruby_core.clj:259:in `invoke'
        from jruby_core.clj:253:in `invoke'
        from jruby_core.clj:270:in `invoke'
        from jruby_core.clj:261:in `invoke'
        from irb.clj:9:in `invokeStatic'
        from irb.clj:6:in `invoke'
        from subcommand.clj:37:in `invokeStatic'
        from subcommand.clj:26:in `invoke'
        from irb.clj:13:in `invokeStatic'
        from irb.clj:11:in `doInvoke'
        from core.clj:646:in `invokeStatic'
        from main.clj:314:in `invokeStatic'
        from main.clj:310:in `invoke'
        from main.clj:421:in `invokeStatic'
        from main.clj:384:in `doInvoke'irb(main):002:0>

Is there a chance you can make your code backward compliant for this version of Ruby ? I confess I don't know how to change util/link_formatter.rb:20 to make it possible, nor if other piece of code use ruby >= 2.0 code.

@Falkor Falkor changed the title Support for jruby-1.7.26 (1.9.3- Support for jruby-1.7.26 (1.9.3-p551) May 26, 2017
@stevenosloan
Copy link
Member

Yeah, at this point w/ the 2.x line I don't think we'll support older syntax -- but if you drop back to 1.5.1 I think that should work for you.

@stevenosloan
Copy link
Member

Doing a little issue pruning, and seems like this is resolve 😄 — lemme know if you feel like it's not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants