# Logstash crash for "LoadError: no such file to load -- restclient"

**URL:** <https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697>\
**Category:** Logstash\
**Created:** [July 16, 2015, 7:30am UTC](https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697 "2015-07-16T07:30:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silvana\_Vezzoli](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Silvana\_Vezzoli](https://discuss.elastic.co/u/Silvana_Vezzoli)\
**Post date:** [July 16, 2015, 7:30am UTC](https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697/1 "2015-07-16T07:30:30Z")

</div>

I installed logstash 1.5.2 on Centos 6.5 VM (test environment).  
My previous used version was Logstash 1.4.2 and I kept the same configuration files used with previous version.  
When I launch logstash I get the following error:  
**LoadError: no such file to load -- restclient**  
**require at org/jruby/RubyKernel.java:1072**  
**require at /application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65**  
**register at (ruby filter init):5**  
**eval at org/jruby/RubyKernel.java:1111**  
**register at /application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-ruby-1.0.0/lib/logstash/filters/ruby.rb:29**  
**each at org/jruby/RubyArray.java:1613**  
**start\_filters at /application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/pipeline.rb:154**  
**run at /application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/pipeline.rb:81**  
**execute at /application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/agent.rb:150**  
**run at /application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/runner.rb:91**  
**call at org/jruby/RubyProc.java:271**  
**run at /application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/runner.rb:96**  
**call at org/jruby/RubyProc.java:271**  
**initialize at /application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.20/lib/stud/task.rb:12**

I use a ruby logstash filter for my use case and I need the rest-client gem, but this gem isn't present under my installation path  
/application/nfmoss/vendors/logstash/vendor/bundle/jruby/1.9/gems/

So I tried to install the rest-client gem with the command "sudo gem install rest-client" (after execution of command "sudo yum install rubygems"), but I get another error:  
**Building native extensions. This could take a while...**  
**ERROR: Error installing rest-client:**  
**ERROR: Failed to build gem native extension.**  
**/usr/bin/ruby extconf.rb**  
**mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h**  
**Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/unf\_ext-0.0.7.1 for inspection.**  
**Results logged to /usr/lib/ruby/gems/1.8/gems/unf\_ext-0.0.7.1/ext/unf\_ext/gem\_make.out**

Now, I don't know what I have to do.  
I work in a test environment not in a developing environment.  
Some suggestion?

Thanks.

---

<div class="post-metadata">

**Author:** ![Silvana\_Vezzoli](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Silvana\_Vezzoli](https://discuss.elastic.co/u/Silvana_Vezzoli)\
**Post date:** [July 17, 2015, 7:36am UTC](https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697/2 "2015-07-17T07:36:37Z")

</div>

My question is: is there a command to install the rest-client gem on top of the Logstash core pipeline?

If I try this installation using the command $LS\_HOME/bin/plugin install rest-client, rightly, I have the following response:  
Validating rest-client  
Found rest-client (1.8.0), but was for platforms x86-mingw32 ,x64-mingw32 ,x86-mswin32  
rest-client is not a Logstash plugin  
ERROR: Installation aborted, verification failed for rest-client

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 18, 2015, 3:18am UTC](https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697/3 "2015-07-18T03:18:18Z")

</div>

How did you install LS?

---

<div class="post-metadata">

**Author:** ![Silvana\_Vezzoli](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Silvana\_Vezzoli](https://discuss.elastic.co/u/Silvana_Vezzoli)\
**Post date:** [July 19, 2015, 4:44pm UTC](https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697/4 "2015-07-19T16:44:45Z")

</div>

tar -zxvf logstash-1.5.2.tar.gz under my installation path

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 19, 2015, 9:51pm UTC](https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697/5 "2015-07-19T21:51:39Z")

</div>

I don't believe there is a rest-client plugin for LS.

---

<div class="post-metadata">

**Author:** ![Silvana\_Vezzoli](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Silvana\_Vezzoli](https://discuss.elastic.co/u/Silvana_Vezzoli)\
**Post date:** [July 20, 2015, 7:16am UTC](https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697/6 "2015-07-20T07:16:03Z")

</div>

No, indeed, I talk about the rest-client gem not the rest-client plugin.

The LS\_HOME/logstash-1.5.2/vendor/bundle/jruby/1.9/gems folder is created when I unzip the logstash package on my installation path.

Under this folder I can see a list of ruby gems used by logstash with a list of logstash plugins.

Now, the folder LS\_HOME/logstash-1.4.2/vendor/bundle/jruby/1.9/gems, related to 1.4.2 version, includes  
the rest-client-1.6.7 ruby gem whereas the folder LS\_HOME/logstash-1.5.2/vendor/bundle/jruby/1.9/gems doesn't include any ruby rest-client gem.

My ruby filter requires the rest-client gem but logstash crashes at starting for the error  
**LoadError: no such file to load -- rest-clien** t.

On logstash github page [https://github.com/elastic/logstash](https://github.com/elastic/logstash) I can see the Gemfile.jruby-1.9.lock file where there is a ruby gems list including the rest-client (1.8.0) gem with his dependencies,  
but after package installation this ruby gem isn't present under LS\_HOME/logstash-1.5.2/vendor/bundle/jruby/1.9/gems folder.  
Maybe, something in package building is wrong.

I'd like to know if there is some work around to solve this problem.  
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:** [July 6, 2017, 5:34am UTC](https://discuss.elastic.co/t/logstash-crash-for-loaderror-no-such-file-to-load-restclient/25697/7 "2017-07-06T05:34:15Z")

</div>


