Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails check is insufficient #1255

Open
robertino opened this issue Nov 3, 2023 · 0 comments
Open

Rails check is insufficient #1255

robertino opened this issue Nov 3, 2023 · 0 comments

Comments

@robertino
Copy link

We have a Sinatra app that uses actionpack gem.
actionpack in turn has a dependency on rails-html-sanitizer gem.
rails-html-sanitizer defines Rails module.
airbrake has a few occurences where a check of defined?(Rails) is performed.
This leads to uninitialized constant Rails::Engine error down the line, as airbrake/rails/app.rb gets included.
The solution to the problem would be a better check for actual existence of Rails framework rather than simple defined?(Rails), otherwise any Rails module/class reference without actual use of rails gem/framework will cause issues with Airbrake (airbrake gem).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant