Invalid Data Source Name

B

Bryan Richardson

[Note: parts of this message were removed to make it a legal post.]

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|
<do something with 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
 
A

Adam Shelly

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|
<do something with file>
end

my guess is that the exception is coming from your mysterious <do
something with file>, since I can't recreate the behavior no matter
what filename I pass, even an invalid one.
 
B

Bryan Richardson

[Note: parts of this message were removed to make it a legal post.]

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 "<do something with file> section of the code. Sorry for the useless
post!!! -- BTR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top