Reputation: 1419
O configure my Ruby on Rails application to use sentry with error report, but it show-me this error:
URI::InvalidURIError: bad URI(is not URI?): 'http://9ba0c50c55c94603a488a55516d5xxx:[email protected]/24'
When I remove 9ba0c50c55c94603a488a55516d5xxx:xxxx6d6468a4cb892140c1f86a9f228@
this part of addresss all works fine, but in sentry documentation is:
Raven.configure do |config|
config.dsn = 'http://public:[email protected]/project-id'
end
How can I solve this problem?
Upvotes: 2
Views: 1056
Reputation: 1419
I was using ENV var
to set sentry DSN
:
# .env
SENTRY_DSN_URL='http://public:[email protected]/project-id'
and in initializer
Raven.configure do |config|
config.dsn = ENV['SENTRY_DSN']
end
This problem is the quotation marks. To solve just remove them.
# .env
SENTRY_DSN_URL=http://public:[email protected]/project-id
Works fine.
Upvotes: 3