Closed ph closed 9 years ago
Same issue on macos x.
~/D/logstash-1.5.0-rc3.snapshot5 ❯❯❯ bin/plugin list
Gem::LoadError: You have already activated jar-dependencies 0.1.13, but your Gemfile requires jar-dependencies 0.1.7. Prepending `bundle exec` to your command may solve this.
setup at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler/runtime.rb:34
each at org/jruby/RubyArray.java:1613
each at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/jruby/lib/ruby/1.9/forwardable.rb:201
setup at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler/runtime.rb:19
setup at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler.rb:122
setup! at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/lib/logstash/bundler.rb:51
execute at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/lib/logstash/pluginmanager/list.rb:20
run at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:67
execute at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/subcommand/execution.rb:11
run at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:67
run at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:132
(root) at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/lib/logstash/pluginmanager.rb:12
I've looked in the .lock file but we only see a hard dependencies requirement on 0.1.7 and nothing on 0.1.13. But the released tarball includes both jar-dependencies 0.1.7
and 0.1.13
.
@suyograo where the files where created locally or on the build server?
Doing the following command fix the tarball:
rm -rf vendor/bundle/jruby/1.9/specifications/jar-dependencies-0.1.13.gemspec
rm -rf vendor/bundle/jruby/1.9/gems/jar-dependencies-0.1.13
~/D/logstash-1.5.0-rc3.snapshot5 ❯❯❯ bin/plugin uninstall logstash-input-stdin ⏎
Uninstalling logstash-input-stdin
~/D/logstash-1.5.0-rc3.snapshot5 ❯❯❯ bin/plugin install logstash-input-stdin
Validating logstash-input-stdin
Installing logstash-input-stdin
Installation successful
~/D/logstash-1.5.0-rc3.snapshot5 ❯❯❯ bin/plugin list stdin
logstash-input-stdin
So this look related to a build issue with a rogue gem install?
This recalls me to the issue I saw a few days ago in rbenv in jenkins. The issue was that with jruby we had a jar-dependency gemspec installed by default, so this issue might be related to the upgraded jruby as @ph point out very good.
Removing this gemspec from the bundle solved the issue in jenkins, if this is a similar one.
The jar-dependency bundled with this newer version or jruby is still fixed at 0.1.2
and not 0.1.13
.
cat vendor/jruby/lib/ruby/gems/shared/specifications/default/jar-dependencies-0.1.2.gemspec
So I am not sure why we 3 versions. So maybe related to jenkins or build.
If related to jenkins or the build, this issue should have been there before the upgrade to 1.7.19, isn't? something change/was fix, with this new jruby that raised this error.
No error on the task that generated the build http://build-eu-1.elasticsearch.org/job/logstash_create_zip_artifact_15/jdk=JDK8,label=metal-pool/lastBuild/consoleText
cd vendor/bundle/jruby/1.9/specifications
ag jar-dependency
jar-dependencies-0.1.7.gemspec
2:# stub: jar-dependencies 0.1.7 ruby lib
5: s.name = "jar-dependencies"
16: s.homepage = "https://github.com/mkristian/jar-dependencies"
jruby-kafka-1.4.0-java.gemspec
27: s.add_runtime_dependency(%q<jar-dependencies>, ["~> 0"])
31: s.add_dependency(%q<jar-dependencies>, ["~> 0"])
36: s.add_dependency(%q<jar-dependencies>, ["~> 0"])
logstash-input-kafka-0.1.13.gemspec
29: s.add_runtime_dependency(%q<jar-dependencies>, ["= 0.1.7"])
38: s.add_dependency(%q<jar-dependencies>, ["= 0.1.7"])
48: s.add_dependency(%q<jar-dependencies>, ["= 0.1.7"])
logstash-output-kafka-0.1.9.gemspec
29: s.add_runtime_dependency(%q<jar-dependencies>, ["= 0.1.7"])
38: s.add_dependency(%q<jar-dependencies>, ["= 0.1.7"])
48: s.add_dependency(%q<jar-dependencies>, ["= 0.1.7"])
good catch @suyograo
The lockfile for 1.5 was created with a dependencies on 0.1.13
and since we are doing a multiple steps run to create a package.
0.1.13
in the bundle directory-0.1.7
of jar-dependency.Where's that table-flip icon when you need it?
(╯°□°)╯︵ ┻━┻