Creating a command-line Gem

Hi. I'm working on creating a Ruby command-line tool that I want to
distribute as a gem. Are there any examples or references on how to do
this? I'd like to create an application similar to god or rake, where
you can enter something like "god myapp.god" and be able to enter that
command anywhere and be called without calling it like "ruby god
myapp.god" or by having to call the script that is nested deep within
the gem directory. I'm starting from scratch on this and have a very low
level of knowledge, so any help on how to do this or where to find more
information would be much appreciated. Thanks in advance.

-Eric

···

--
Posted via http://www.ruby-forum.com/.

Either use or study hoe. In hoe you put cmdline tools in a bin directory and list them in the manifest. hoe automatically takes care of the gem details for you.

quick start instructions:

sudo gem install hoe
sow thingy
cd thingy
poke around

···

On Jun 25, 2008, at 14:31 , Eric Marthinsen wrote:

Hi. I'm working on creating a Ruby command-line tool that I want to
distribute as a gem. Are there any examples or references on how to do
this? I'd like to create an application similar to god or rake, where
you can enter something like "god myapp.god" and be able to enter that
command anywhere and be called without calling it like "ruby god
myapp.god" or by having to call the script that is nested deep within
the gem directory. I'm starting from scratch on this and have a very low
level of knowledge, so any help on how to do this or where to find more
information would be much appreciated. Thanks in advance.

Thanks. I'll check it out.

···

--
Posted via http://www.ruby-forum.com/.