Actions
Feature #15378
closedURI::InvalidURIError (bad URI(is not URI?)
Status:
Third Party's Issue
Assignee:
-
Target version:
-
Description
I using the ruby 2.5.3 and try to save this url http://zapovednik.space/material/stantsija-petropavlovsk
URI::InvalidURIError (bad URI(is not URI?):
http://zapovednik.space/material/stantsija-petropavlovsk):
class FeedEntry
field :url, type: String
before_create :save_uri
def save_uri
self.url = URI(self.url).tap { |uri| uri.query = nil }.to_s
end
end
Trace:
/Users/ipatov/.rbenv/versions/2.5.3/lib/ruby/2.5.0/uri/rfc3986_parser.rb:67:in `split'
/Users/ipatov/.rbenv/versions/2.5.3/lib/ruby/2.5.0/uri/rfc3986_parser.rb:73:in `parse'
/Users/ipatov/.rbenv/versions/2.5.3/lib/ruby/2.5.0/uri/common.rb:237:in `parse'
/Users/ipatov/.rbenv/versions/2.5.3/lib/ruby/2.5.0/uri/common.rb:743:in `URI'
app/models/feed_entry.rb:54:in `save_uri'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:426:in `block in make_lambda'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:605:in `catch'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:605:in `block in default_terminator'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:199:in `block in halting'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:513:in `block in invoke_before'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:513:in `each'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:513:in `invoke_before'
activesupport (5.2.1.1) lib/active_support/callbacks.rb:131:in `run_callbacks'
Actions
Like0
Like0Like0Like0Like0Like0Like0