Sophrinix / TryRuby

Try Ruby is a interactive shell that quickly and whimsically teaches the Ruby programming language. Originally _why's idea, it has been recreated from the ground up by Rubyists who have a passion for Ruby and for teaching their fellow (wo)man how to program.
tryruby.org
345 stars 80 forks source link

unexpected tGVAR #177

Open adarsh-awasthi opened 2 years ago

adarsh-awasthi commented 2 years ago

getting syntax error in ruby 2.4

syntax error, unexpected tGVAR, expecting ')' where=properties["$distinct_id"] == "31A15D191044478AA0

my piece of code

require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://data.mixpanel.com/api/2.0/export?from_date=2017-07-13&to_date=2021-07-16&where=properties["$distinct_id"] == "31A15D1910444..........E7D4E2"")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Basic  (hidden)'

response = http.request(request)
puts response.read_body

can anybody figure it out why i am getting this error