# Jar dependencies - editing bundler.gemspec file

**URL:** <https://discuss.elastic.co/t/jar-dependencies-editing-bundler-gemspec-file/115088>\
**Category:** Logstash\
**Created:** [January 11, 2018, 12:34pm UTC](https://discuss.elastic.co/t/jar-dependencies-editing-bundler-gemspec-file/115088 "2018-01-11T12:34:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Milad\_Hamid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/milad_hamid/32/24327_2.png) [@Milad\_Hamid](https://discuss.elastic.co/u/Milad_Hamid)\
**Post date:** [January 11, 2018, 12:34pm UTC](https://discuss.elastic.co/t/jar-dependencies-editing-bundler-gemspec-file/115088/1 "2018-01-11T12:34:13Z")

</div>

Hi,

I am getting this error when running logstash 6.1.1:

```
    Gem::LoadError: You have already activated jar-dependencies 0.3.12, but your Gemfile
    requires jar-dependencies 0.3.11. Prepending `bundle exec` to your command may solve this.

    block in setup at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/bundler-1.9.10/lib/bundler/runtime.rb:34 

```

so after reading [here](https://www.elastic.co/guide/en/logstash/6.1/_how_to_write_a_logstash_output_plugin.html#_add_a_literal_gemspec_literal_file_4) i think should edit `bundler.gemspec` and add Jar dependencies.

So if what i am trying to do and edit the `bundler.gemspec` file is correct how can i do it how to add jar-dependencies 0.3.11 to following code:

`/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/bundler-1.9.10`

```
# coding: utf-8
lib = File.expand_path('../lib/', __FILE__ )
$:.unshift lib unless $:.include?(lib)
require 'bundler/version'

Gem::Specification.new do |s|
  s.name = 'bundler'
  s.version = Bundler::VERSION
  s.licenses = ['MIT']
  s.authors = ["AndrÃ© Arko", "Terence Lee", "Carl Lerche", "Yehuda Katz"]
  s.email = ["andre.arko+terence.lee@gmail.com"]
  s.homepage = "http://bundler.io"
  s.summary = %q{The best way to manage your application's dependencies}
  s.description = %q{Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably}

  s.required_ruby_version = '>= 1.8.7'
  s.required_rubygems_version = '>= 1.3.6'

  s.add_development_dependency 'mustache', '0.99.6'
  s.add_development_dependency 'rdiscount', '~> 1.6'
  s.add_development_dependency 'ronn', '~> 0.7.3'
  s.add_development_dependency 'rspec', '~> 3.0'
  s.add_development_dependency 'rake'

  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
  # we don't check in man pages, but we need to ship them because
  # we use them to generate the long-form help for each command.
  s.files += Dir.glob('lib/bundler/man/**/*')

  s.executables = %w(bundle bundler)
  s.require_paths = ["lib"]
end

```

Please help with this error.

---

<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 8, 2018, 12:34pm UTC](https://discuss.elastic.co/t/jar-dependencies-editing-bundler-gemspec-file/115088/2 "2018-02-08T12:34:24Z")

</div>

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