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

**URL:** <https://discuss.elastic.co/t/logstash-plugin-logstash-input-google-cloud-pubsub-and-how-to-change-jruby-version/58855>\
**Category:** Logstash\
**Created:** [August 24, 2016, 5:36pm UTC](https://discuss.elastic.co/t/logstash-plugin-logstash-input-google-cloud-pubsub-and-how-to-change-jruby-version/58855 "2016-08-24T17:36:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jingxuan\_Sun](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@Jingxuan\_Sun](https://discuss.elastic.co/u/Jingxuan_Sun)\
**Post date:** [August 24, 2016, 5:36pm UTC](https://discuss.elastic.co/t/logstash-plugin-logstash-input-google-cloud-pubsub-and-how-to-change-jruby-version/58855/1 "2016-08-24T17:36:17Z")

</div>

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:in`initialize'  
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:in`initialize'  
/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:in`run'  
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:in`run'  
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:in`initialize'

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:41am UTC](https://discuss.elastic.co/t/logstash-plugin-logstash-input-google-cloud-pubsub-and-how-to-change-jruby-version/58855/2 "2017-07-06T04:41:47Z")

</div>


