well,i had the same problem ...But i thougt to delete the files which seems to be containing the error and replace them by new ones and hopefully this worked out !!

try to cd to the file ..rm file.rb ...then replace with another (nano file.rb and past code then save it) this must work