logstash-plugins / logstash-output-websocket

Apache License 2.0
5 stars 13 forks source link

Incompatible sinatra in logstash:7.6.2 #16

Open edmundlord28 opened 4 years ago

edmundlord28 commented 4 years ago

Validating logstash-output-websocket-3.0.5.gem Installing logstash-output-websocket Plugin version conflict, aborting ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "sinatra": In snapshot (Gemfile.lock): sinatra (= 2.0.8.1)

In Gemfile: logstash-core java was resolved to 7.6.2, which depends on sinatra (~> 2) java

logstash-output-websocket (= 3.0.5) java was resolved to 3.0.5, which depends on
  sinatra (~> 1.4.6) java

Running bundle update will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict.

antoineb19 commented 4 years ago

Updating the version in the gemspec file worked for me :

--- a/logstash-output-websocket.gemspec
+++ b/logstash-output-websocket.gemspec
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
   # Gem dependencies
   s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
   s.add_runtime_dependency 'logstash-codec-plain'
-  s.add_runtime_dependency 'sinatra', '~> 1.4.6'
+  s.add_runtime_dependency 'sinatra', '~> 2'
   s.add_runtime_dependency 'ftw', ['~> 0.0.46']

   s.add_development_dependency 'logstash-devutils'

Sinatra is used in lib/logstash/outputs/websocket/app.rb using sinatra and the usage seems to be compatible with sinatra v2

wy0917 commented 1 week ago

Logstash:8.x have the similar problem

ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "sinatra": In Gemfile: logstash-core was resolved to 8.15.3, which depends on sinatra (~> 4)

logstash-output-websocket (= 3.1.0) was resolved to 3.1.0, which depends on sinatra (~> 2)