Skip to content
This repository was archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
Improved error message when geocoder gem not installed [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Aug 14, 2021
1 parent 1840eac commit 90075cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.1 (unreleased)

- Improved error message when `geocoder` gem not installed

## 0.4.0 (2021-08-13)

- Disabled geocoding by default
Expand Down
3 changes: 1 addition & 2 deletions app/jobs/auth_trail/geocode_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ def perform(login_activity)
begin
Geocoder.search(login_activity.ip).first
rescue NameError
# geocoder gem not installed
raise
raise "Add the geocoder gem to your Gemfile to use geocoding"
rescue => e
Rails.logger.info "Geocode failed: #{e.message}"
nil
Expand Down

0 comments on commit 90075cf

Please sign in to comment.