Ruby exception - Logstash

I'm getting the ERROR
[ERROR][logstash.filters.ruby ] Ruby exception occurred: End of file reached

this is my ruby.

ruby {
init => "
require 'net/http'
require 'uri'
"
code => "
direccion = event.get('DIRECC')
direccion.gsub!(' ','%20')

url = 'https://maps.googleapis.com/maps/api/geocode/json?address='+ direccion + '%20do,%20Aia,%20Ploa'+'&key=AIzaSyDxUNZ7rljYM1I--RiE3SC-7irE41n'

uri = URI(url)
res = Net::HTTP.get(uri)   
val = res.body		
		 
 "

}
I concatenated '%20' as a spaces because and example of DIRECC is "CL 40 CR 27 21 INT 500" with spaces, but I have that error.
Somebody has any idea?

Thanks.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.