# Logstash ruby exception

**URL:** <https://discuss.elastic.co/t/logstash-ruby-exception/182247>\
**Category:** Logstash\
**Created:** [May 22, 2019, 2:13pm UTC](https://discuss.elastic.co/t/logstash-ruby-exception/182247 "2019-05-22T14:13:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zcx](https://avatars.discourse-cdn.com/v4/letter/z/e68b1a/32.png) [@zcx](https://discuss.elastic.co/u/zcx)\
**Post date:** [May 22, 2019, 2:13pm UTC](https://discuss.elastic.co/t/logstash-ruby-exception/182247/1 "2019-05-22T14:13:58Z")

</div>

when Embed ruby scripts in the filter  
and an error occur as follows:  
[ERROR][logstash.filters.ruby] Ruby exception occurred: undefined method `filter\_method' for #LogStash::Filters::Ruby:0x4cd94f01 Did you mean? filter\_matched

the ruby scripts contains:  
def register(params)  
@message = params["message"]  
end  
def filter(event)  
message=event.get('message')  
...

thanks

---

<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:** [June 19, 2019, 2:14pm UTC](https://discuss.elastic.co/t/logstash-ruby-exception/182247/2 "2019-06-19T14:14:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
