[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    1.8 parse error?
From:       ahoward <ahoward () fsl ! noaa ! gov>
Date:       2003-04-08 18:35:43
[Download RAW message or body]



i'm getting :

~/eg/ruby/btpgsql/btpgsql-0.2.0 > ruby test/btpgsql.rb
test/btpgsql.rb:1191: ERROR:  parser: parse error at or near "#!/" (PGError)

        from test/btpgsql.rb:1186:in `each'
        from test/btpgsql.rb:1186


from

   1 #!/usr/bin/env ruby
   ...
   1184     sql.gsub!(%r{--.*$}, '') # kill comments
   1185     sql.gsub!(%r{\n}, ' ')
   1186     sql.split(%r{;}).each do |statement|
   1187       begin
   1188         res = pgconn.exec(statement)
   1189         res.clear
   1190       rescue PGError => pgerror
   1191         raise(pgerror) unless (pgerror.inspect() =~ %r{does not exist}i)
   1192       end
   1193     end
   ...

if i comment out line 1191 the error goes away?

i'm running

	ruby 1.8.0 (2003-03-03) [i686-linux]

on

	Linux 2.2.14-5.0 i686
	Red Hat Linux release 6.2 (Zoot)

-a


--
  ====================================
  | Ara Howard
  | NOAA Forecast Systems Laboratory
  | Information and Technology Services
  | Data Systems Group
  | R/FST 325 Broadway
  | Boulder, CO 80305-3328
  | Email: ahoward@fsl.noaa.gov
  | Phone:  303-497-7238
  | Fax:    303-497-7259
  ====================================

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic