# Load logstash environment in tests

**URL:** <https://discuss.elastic.co/t/load-logstash-environment-in-tests/91150>\
**Category:** Logstash\
**Created:** [June 28, 2017, 4:16pm UTC](https://discuss.elastic.co/t/load-logstash-environment-in-tests/91150 "2017-06-28T16:16:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Conall\_Prendergast](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@Conall\_Prendergast](https://discuss.elastic.co/u/Conall_Prendergast)\
**Post date:** [June 28, 2017, 4:16pm UTC](https://discuss.elastic.co/t/load-logstash-environment-in-tests/91150/1 "2017-06-28T16:16:31Z")

</div>

Hi,

I am trying to run tests using a logstash environment from a downloaded logstash.

In my spec file, I "require" the "environment.rb" file of a logstash installation, and then run

```
LogStash::Bundler.setup!({:without => [:build, :development]})

```

I was hoping this would use all the gems in the logstash installation but instead I get an error

`Bundler::GemNotFound: Could not find paquet-0.2.1 in any of the sources materialize at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/spec_set.rb:87 map! at org/jruby/RubyArray.java:2446 materialize at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/spec_set.rb:81 specs at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/definition.rb:159 specs_for at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/definition.rb:218 requested_specs at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/definition.rb:207 requested_specs at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/runtime.rb:109 setup at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/runtime.rb:21 setup at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler.rb:101 setup! at /root/logstash-5.4.3/lib/bootstrap/bundler.rb:68 (root) at /root/logstash-5.4.3/lib/bootstrap/environment.rb:68`

This is because bundler is picking up the Gemfile from the logstash installation, where paquet is required, but it doesnt know to search for these in the correct location.

Is there something I am doing wrong here? How should I set up my tests to run in a logstash environment?

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 26, 2017, 4:16pm UTC](https://discuss.elastic.co/t/load-logstash-environment-in-tests/91150/2 "2017-07-26T16:16:42Z")

</div>

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