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

No method found for blank? #33

Open
harlanbarnes opened this issue Dec 7, 2020 · 4 comments
Open

No method found for blank? #33

harlanbarnes opened this issue Dec 7, 2020 · 4 comments

Comments

@harlanbarnes
Copy link

Hi there!

First off, thank you for what you do in Open Source.

I doubt this is the correct reporting format and I apologize for that. However I believe this line:

unless /%{\w+}/.match(t) || t.blank?

should be something like this:

 unless /%{\w+}/.match(t) || t.empty?

That is, the blank? method is in activesupport and not available here. And since t is a string it should respond to empty? in a way that makes everything work correctly.

Thanks,

hb

@ryechus
Copy link

ryechus commented Dec 16, 2020

I am seeing this error when I specify a tag.

@mool
Copy link

mool commented Dec 13, 2021

I'm getting the same error...

[ERROR] 2021-12-13 22:22:38.948 [[main]>worker0] javapipeline - Pipeline worker error, the pipeline will be stopped {:pipeline_id=>"main", :error=>"(NoMethodError) undefined method `blank?' for \"kubernetes\":String", :exception=>Java::OrgJrubyExceptions::NoMethodError, :backtrace=>["RUBY.prepare_meta(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-loggly-6.0.0/lib/logstash/outputs/loggly.rb:145)", "org.jruby.RubyArray.each(org/jruby/RubyArray.java:1821)", "RUBY.prepare_meta(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-loggly-6.0.0/lib/logstash/outputs/loggly.rb:142)", "RUBY.multi_receive(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-loggly-6.0.0/lib/logstash/outputs/loggly.rb:127)", "org.jruby.RubyArray.collect(org/jruby/RubyArray.java:2584)", "RUBY.multi_receive(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-loggly-6.0.0/lib/logstash/outputs/loggly.rb:127)", "org.logstash.config.ir.compiler.OutputStrategyExt$AbstractOutputStrategyExt.multi_receive(org/logstash/config/ir/compiler/OutputStrategyExt.java:143)", "org.logstash.config.ir.compiler.AbstractOutputDelegatorExt.multi_receive(org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:121)", "RUBY.start_workers(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:299)"], :thread=>"#<Thread:0xd632ed2@/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:129 sleep>"}

@mool
Copy link

mool commented Dec 14, 2021

I tested the proposed solution and it fixes the issue. The String class has the empty? method instead of blank?,

@JeremyCB
Copy link

JeremyCB commented Nov 3, 2022

Same here... Why has the PR been closed? This is a valid fix...

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

4 participants