Uses the hash.compact method which was introduced in Ruby 2.4
Not sure at this point if it's worth mantaining compatibility with such old releases or just update https://github.com/instana/ruby-sensor/blob/master/instana.gemspec#L34 to prevent bundler to download uncompatible versions of the gem.
I ended up updating the ruby version for the project I'm working so I don't really need this fixed. Reporting nonetheless in case someone else stumbles into this.
Minimal, Complete, Verifiable, Example
Try to load the gem on with ruby 2.1 or 2.2 app with INSTANA_DEBUG=True on the env. You will see the stacktraces for the missing method error when the gem loads.
Problem Description
The rspec file for this project claims it works with Ruby < 2.4 but the code in https://github.com/instana/ruby-sensor/blob/f6fb1b12953d01054da54eb66250fc8fd35f0dc5/lib/instana/backend/host_agent_activation_observer.rb#L68
Uses the hash.compact method which was introduced in Ruby 2.4
Not sure at this point if it's worth mantaining compatibility with such old releases or just update https://github.com/instana/ruby-sensor/blob/master/instana.gemspec#L34 to prevent bundler to download uncompatible versions of the gem. I ended up updating the ruby version for the project I'm working so I don't really need this fixed. Reporting nonetheless in case someone else stumbles into this.
Minimal, Complete, Verifiable, Example
Try to load the gem on with ruby 2.1 or 2.2 app with INSTANA_DEBUG=True on the env. You will see the stacktraces for the missing method error when the gem loads.
Gemfile.lock
Ruby Version