# Ruby exception with no message

**URL:** <https://discuss.elastic.co/t/ruby-exception-with-no-message/198887>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [September 10, 2019, 11:13am UTC](https://discuss.elastic.co/t/ruby-exception-with-no-message/198887 "2019-09-10T11:13:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yujin](https://avatars.discourse-cdn.com/v4/letter/y/fbc32d/32.png) [@yujin](https://discuss.elastic.co/u/yujin)\
**Post date:** [September 10, 2019, 11:13am UTC](https://discuss.elastic.co/t/ruby-exception-with-no-message/198887/1 "2019-09-10T11:13:23Z")

</div>

I was trying to use ruby filter to calculate time difference:

```
ruby{
  code => "require 'date'; 
  event.set('landing_delay',((
        DateTime.parse(event.get('landing_t')) - 
        DateTime.parse(event.get('t'))
      ) * 24 * 60 * 60
    ).to_i
  )"
}

```

But sometimes it works, sometimes it returns error:

`[ERROR][logstash.filters.ruby] Ruby exception occurred:`

with no detailed information.

I'm using logstash 6.4.2 on docker, anyone can help? Many 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:** [October 8, 2019, 11:13am UTC](https://discuss.elastic.co/t/ruby-exception-with-no-message/198887/2 "2019-10-08T11:13:23Z")

</div>

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