Im seem to be having a bit of a problem with my program. i am setting an exception within a for loop and i cant seem to get the loop to stop instead I am getting syntax error, unexpected '\n', expecting tCOLON2 or '[' or '.' could any one tell what i am doing wrong. I left out the hard coded url for security purposes. but please let say thanks in advance for any help i could get.
for (1..7).each do |days_ago|
#here we take the file path from each customer and replace the day with todays date.
url = "sample url"
todays_url = url.gsub( '2010-10-01' ,y+"-"+m+"-"+d )
try_again = 0
#this is where we want to check weather the file actually exist in the directory.
#here we will take the new url and retrive the new file from the server.
uri = todays_url
source = open(uri)
try_again = 1
unless try_again == 0