Logstash plugin logstash-input-google-cloud-pubsub and how to change jruby version

I am trying to add plugin logstash-input-google-cloud-pubsub, When I built the gem file, It only support gem and ruby version>2.2. I could install this plugin successfully using bin/plugin install.
But when i run the test : bin/logstash -e 'input {google-cloud-pubsub {}}' --debug
The error shows:

Compiled pipeline code:
@inputs = []
@filters = []
@outputs = []
@periodic_flushers = []
@shutdown_flushers = []

      @input_google-cloud-pubsub_1 = plugin("input", "google-cloud-pubsub")

      @inputs << @input_google-cloud-pubsub_1

      @output_stdout_2 = plugin("output", "stdout", LogStash::Util.hash_merge_many({ "codec" => ("rubydebug") }))

      @outputs << @output_stdout_2

def filter_func(event)
events = [event]
@logger.debug? && @logger.debug("filter received", :event => event.to_hash)
events
end
def output_func(event)
@logger.debug? && @logger.debug("output received", :event => event.to_hash)
@output_stdout_2.handle(event)

end {:level=>:debug, :file=>"logstash/pipeline.rb", :line=>"38", :method=>"initialize"}
The error reported is:
undefined local variable or method cloud' for #<LogStash::Pipeline:0x20e18e70> (eval):7:ininitialize'
org/jruby/RubyKernel.java:1079:in eval' /opt/logstash/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.0-java/lib/logstash/pipeline.rb:40:ininitialize'
/opt/logstash/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.0-java/lib/logstash/agent.rb:124:in execute' /opt/logstash/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.0-java/lib/logstash/runner.rb:90:inrun'
org/jruby/RubyProc.java:271:in call' /opt/logstash/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.0-java/lib/logstash/runner.rb:95:inrun'
org/jruby/RubyProc.java:271:in call' /opt/logstash/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/task.rb:24:ininitialize'

What is the reason for this error since it already installed successfully.
Is it a version issue for jruby1.9 in logstash. If that is the reason, is there a way to change the jruby version to >2.2 in logstash.