Invalid Data Source Name

Hello,

Does anyone know what causes the “Invalid Data Source Name” exception?
I
get this from OptionParser. Here’s my code:

opts = OptionParser.new
opts.on(’–load-file FILE’) do |file|

end

begin
opts.parse!(ARGV)
rescue Exception => e
puts e, “”, opts
exit 0
end

when I run this, I get the following output:

#:~/devel$ ./program --load-file test.txt
Invalid Data Source Name

Usage: program [options]
– load-file FILE
#:~/devel$

Any suggestions?! Thanks! – BTR

On 12/20/07, Bryan R. [email protected] wrote:

Hello,

Does anyone know what causes the “Invalid Data Source Name” exception? I
get this from OptionParser. Here’s my code:

opts = OptionParser.new
opts.on(‘–load-file FILE’) do |file|

end

my guess is that the exception is coming from your mysterious , since I can’t recreate the behavior no matter
what filename I pass, even an invalid one.

Thanks for responding. Actually, I’m an idiot and wasn’t passing
“DB:PG:”
along with the name of my database. You are correct in that the problem
was
in my " section of the code. Sorry for the
useless
post!!! – BTR