From: Peter Lane Date: 2011-11-30T08:37:23+09:00 Subject: Re: Simple optparser problem When you write: opts.on('-d', '--database', 'comments go here') do |x| options[:database] = x end 'x' will be set to 'true', not the input value you expect. If you want flags with values, you need to include a "VAL" placeholder: opts.on('-d VAL', '--database VAL', 'comments go here') do |x| options[:database] = x end Then 'x' will hold the value after the -d flag. -- Posted via http://www.ruby-forum.com/.