Jruby beginner

I have been using DSL rules so far and would now like to start with jruby. I installed everything in 4.3.0.M5 according to the instructions and created a file test.rb with the following content in \automation\ruby.

rule 'Log the rule name every minute' do |rule|
  description 'This rule will create a log every minute'
  every :minute
  run { logger.info "Rule '#{rule.name}' executed" }
end

Despite an intensive search, I couldn’t find anywhere which file extension should be used. .ruby, .jruby, .rb are attempts. I would have expected this to be carried out automatically, but I can’t find any indication of this in the log. What am I doing wrong?

You file should be in automation/ruby/. The filename should end with .rb. Try removing |rule| in the first line of your code

2 Likes

thanks, it works now