Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #6858
| Newsgroups | comp.lang.ruby |
|---|---|
| Date | 2013-08-07 04:46 -0700 |
| Message-ID | <82f9d89b-33da-48cc-adc8-1a6776f29050@googlegroups.com> (permalink) |
| Subject | unterminated string meets end of file |
| From | div n <divya.n25@gmail.com> |
Tried the following script on MAC os using ruby , but i get the following error
#$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../..')
#$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib')
require 'rubygems'
require 'yajl'
require 'json-compare'
files = Dir.glob("../Downloads/Emailing__a/b.json")
@original_string_or_regex = "\""
@replacement_string = """
text = File.read(files)
puts = text.gsub(/@original_string_or_regex/, @replacement_string)
File.open(filename, 'rw') { |file| file << puts }
but i get the following error.
unterminated string meets end of file
can anyone suggest on how to fix this?
Back to comp.lang.ruby | Previous | Next — Next in thread | Find similar
unterminated string meets end of file div n <divya.n25@gmail.com> - 2013-08-07 04:46 -0700
Re: unterminated string meets end of file Andi Altendorfer <iboard.cc@gmail.com> - 2013-08-07 06:13 -0700
Re: unterminated string meets end of file div n <divya.n25@gmail.com> - 2013-08-08 02:23 -0700
Re: unterminated string meets end of file Andi Altendorfer <iboard.cc@gmail.com> - 2013-08-08 04:07 -0700
Re: unterminated string meets end of file Simon Krahnke <overlord@gmx.li> - 2013-08-08 21:31 +0200
Re: unterminated string meets end of file Robert Klemme <shortcutter@googlemail.com> - 2013-08-12 21:15 +0200
csiph-web