# Does ruby script in logstash not support inifile and iniparse?

**URL:** <https://discuss.elastic.co/t/does-ruby-script-in-logstash-not-support-inifile-and-iniparse/117154>\
**Category:** Logstash\
**Created:** [January 26, 2018, 6:15am UTC](https://discuss.elastic.co/t/does-ruby-script-in-logstash-not-support-inifile-and-iniparse/117154 "2018-01-26T06:15:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chunbo\_Liao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chunbo_liao/32/48172_2.png) [@Chunbo\_Liao](https://discuss.elastic.co/u/Chunbo_Liao)\
**Post date:** [January 26, 2018, 6:15am UTC](https://discuss.elastic.co/t/does-ruby-script-in-logstash-not-support-inifile-and-iniparse/117154/1 "2018-01-26T06:15:06Z")

</div>

I want to use inifile(iniparse is ok too) in ruby code (in my logstash conf file).  
my code is:  
ruby{  
init =\> "require 'inifile'; @@causeList = IniFile.load('./causeList.ini');"  
code =\>"  
if !(event.get('message').split('Cause:')[1].nil?)  
......

the error logs:  
[2018-01-26T22:16:00,253][ERROR][logstash.agent] Failed to execute action {:id=\>:main, :action\_type=\>LogStash::ConvergeResult::FailedAction, :message=\>"Could not execute action: LogStash::PipelineAction::Create/pipeline\_id:main, action\_result: false", :backtrace=\>nil}  
LoadError: no such file to load -- inifile

does, logstash not support ruby (inifile, iniparse)?

---

<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:** [February 23, 2018, 6:15am UTC](https://discuss.elastic.co/t/does-ruby-script-in-logstash-not-support-inifile-and-iniparse/117154/2 "2018-02-23T06:15:07Z")

</div>

Closed on February 23, 2018, 6:15am UTC

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