Forum: Ruby Commonly agreed command line options gem?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F1938de600a3feacd015051492fdaf0f?d=identicon&s=25 LAMBEAU Bernard (Guest)
on 2009-01-12 15:36
(Received via mailing list)
Hi,

- Is there a commonly agreed gem for parsing command line options of a
script (ARGV) ?
- If no, does anyone know a good one ?

In all cases (as I'm relatively new to Ruby), what heuristic do you
use to select the gems you need? There actually a lot of gems
available and selecting the good one (still maintained, well tested,
famous ruby developers maybe (?), ...) is pretty hard to me.

Thanks
blambeau
E088bb5c80fd3c4fd02c2020cdacbaf0?d=identicon&s=25 Jesús Gabriel y Galán (Guest)
on 2009-01-12 16:23
(Received via mailing list)
On Mon, Jan 12, 2009 at 3:35 PM, LAMBEAU Bernard <blambeau@gmail.com>
wrote:
>
OptionParser is in ruby core:

http://www.ruby-doc.org/core/classes/OptionParser.html

I am very happy with Ara Howard's "main" gem, though.
It's very easy to use.

Jesus.
Ff97ca87af59ee68ceff5877a8365788?d=identicon&s=25 Jarmo Pertman (juuser)
on 2009-01-13 23:06
I am used GetoptLong class in stdlib:
http://www.ruby-doc.org/stdlib/libdoc/getoptlong/r...

Just look at that self-explanatory example and You're ready to go.

Regards,
Jarmo
3da512875f3295be2d577fa70b3493b4?d=identicon&s=25 Sebastian W. (globulus)
on 2009-01-14 23:32
LAMBEAU Bernard wrote:
> Hi,
>
> - Is there a commonly agreed gem for parsing command line options of a
> script (ARGV) ?
> - If no, does anyone know a good one ?
>
> In all cases (as I'm relatively new to Ruby), what heuristic do you
> use to select the gems you need? There actually a lot of gems
> available and selecting the good one (still maintained, well tested,
> famous ruby developers maybe (?), ...) is pretty hard to me.
>
> Thanks
> blambeau

My absolute favorite is "trollop". It is mega-mega awesome.
This topic is locked and can not be replied to.