prometheus / client_ruby

Prometheus instrumentation library for Ruby applications
Apache License 2.0
513 stars 149 forks source link

cannot load such file -- prometheus/middleware/collector (LoadError) #293

Closed DerekCrosson closed 11 months ago

DerekCrosson commented 1 year ago

When running the config.ru code in the readme I get the following error:

cannot load such file -- prometheus/middleware/collector (LoadError)

This happens because the required files and namespaces have changed.|

This PR updates the readme to provide code that works: https://github.com/prometheus/client_ruby/pull/294

Sinjo commented 12 months ago

Hey @DerekCrosson, sorry for the slow reply.

Could you confirm which version of the gem you're using? Those files are in the prometheus/middleware directory on the current main revision and that directory hasn't been touched for 10 months.

I can only guess you're on something older?

Sinjo commented 11 months ago

Closing this and the assosiated PR as I'm pretty sure those paths are from an older version. Feel free to reopen if there's an issue with the current version.