Skip to content

Commit

Permalink
Fix Padrino require error
Browse files Browse the repository at this point in the history
When Padrino is loaded it will raise an error about `Rack::Server` not
being found. That's because the constant has been renamed to
`Rackup::Server` in newer versions of Rack and Rackup.

The latest version of Padrino is not updated for this yet, so catch the
error if it occurs. This makes our detection a bit less accurate, but at
least it won't crash the installer.
  • Loading branch information
tombruijn committed Jul 31, 2024
1 parent 98fae7e commit dfe2370
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changesets/fix-error-on-padrino-require.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: patch
type: fix
---

Fix an error on the Padrino require in the installer CLI. The latest Padrino version will crash the installer on load. Ignore the error when it fails to load.
2 changes: 1 addition & 1 deletion lib/appsignal/cli/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def installed_frameworks
def framework_available?(framework_file)
require framework_file
true
rescue LoadError
rescue LoadError, NameError
false
end

Expand Down

0 comments on commit dfe2370

Please sign in to comment.