Skip to content

"Incompatible version of the passenger gem" even when Passenger has the right version #3721

Closed

Description

Current behaviour
We have passenger 6.0.22 installed in our Dockerfile on Ruby 3.3.3-bullseye via

apt-get install -y nginx libnginx-mod-http-passenger

We don't have the passenger gem itself in our Gemfile. The PhusionPassenger constant get's injected by the nginx module.

At startup ddtrace complains with this warning:

WARN -- ddtrace: [ddtrace] Enabling the profiling "no signals" workaround because an incompatible version of the passenger gem is installed. Profiling data will have lower quality.To fix this, upgrade the passenger gem to version 6.0.19 or above.

Expected behaviour
ddtrace should look at the PhusionPassenger::VERSION_STRING constant instead of Gem.loaded_specs['passenger'].version:

private_class_method def self.incompatible_passenger_version?
if Gem.loaded_specs['passenger']
Gem.loaded_specs['passenger'].version < Gem::Version.new('6.0.19')
else
true
end
end

So maybe these lines could be

      private_class_method def self.incompatible_passenger_version?
        if defined?(PhusionPassenger)
          PhusionPassenger::VERSION_STRING < Gem::Version.new('6.0.19')
        else
          true
        end
      end

Steps to reproduce

  • Remove passenger gem from Gemfile if present
  • Install Passenger in nginx via libnginx-mod-http-passenger
  • Start the rails server in passenger, then you should see the warning

Environment

  • datadog version: ddtrace 1.23.1
  • Ruby version: 3.3.3
  • Operating system: Debian bullseye
  • Relevant library versions:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugInvolves a bugcommunityWas opened by a community memberprofilingInvolves Datadog profiling

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions