add binary to gem spec?

Discussion in 'Ruby' started by Giles Bowkett, Nov 21, 2007.

  1. Hi all - I want to add a Ruby script to a gem, so that users of the
    gem get not just the gem itself but also a script in /opt/local/bin
    that they can run which packages up some of the functionality on the
    command line. Very much like s3sh in the Amazon S3 gem (gem install
    aws-s3).

    Any pointers to relevant docs? Couldn't find it in the Pickaxe.

    --
    Giles Bowkett

    Podcast: http://hollywoodgrit.blogspot.com
    Blog: http://gilesbowkett.blogspot.com
    Portfolio: http://www.gilesgoatboy.org
    Tumblelog: http://giles.tumblr.com
    Giles Bowkett, Nov 21, 2007
    #1
    1. Advertising

  2. Giles Bowkett

    Luis Lavena Guest

    On Nov 21, 3:15 pm, Giles Bowkett <> wrote:
    > Hi all - I want to add a Ruby script to a gem, so that users of the
    > gem get not just the gem itself but also a script in /opt/local/bin
    > that they can run which packages up some of the functionality on the
    > command line. Very much like s3sh in the Amazon S3 gem (gem install
    > aws-s3).
    >
    > Any pointers to relevant docs? Couldn't find it in the Pickaxe.


    http://docs.rubygems.org/read/chapter/20#executables
    Luis Lavena, Nov 21, 2007
    #2
    1. Advertising

  3. Giles Bowkett, Nov 21, 2007
    #3
  4. Why not just use something like newgem or hoe to build your gem that
    will handle this sort of stuff for you?

    --Jeremy

    On Nov 21, 2007 1:15 PM, Giles Bowkett <> wrote:
    > Hi all - I want to add a Ruby script to a gem, so that users of the
    > gem get not just the gem itself but also a script in /opt/local/bin
    > that they can run which packages up some of the functionality on the
    > command line. Very much like s3sh in the Amazon S3 gem (gem install
    > aws-s3).
    >
    > Any pointers to relevant docs? Couldn't find it in the Pickaxe.
    >
    > --
    > Giles Bowkett
    >
    > Podcast: http://hollywoodgrit.blogspot.com
    > Blog: http://gilesbowkett.blogspot.com
    > Portfolio: http://www.gilesgoatboy.org
    > Tumblelog: http://giles.tumblr.com
    >
    >




    --
    http://www.jeremymcanally.com/

    My books:
    Ruby in Practice
    http://www.manning.com/mcanally/

    My free Ruby e-book
    http://www.humblelittlerubybook.com/

    My blogs:
    http://www.mrneighborly.com/
    http://www.rubyinpractice.com/
    Jeremy McAnally, Nov 22, 2007
    #4
  5. Giles Bowkett

    Luis Lavena Guest

    On Nov 22, 1:06 am, Jeremy McAnally <> wrote:
    > Why not just use something like newgem or hoe to build your gem that
    > will handle this sort of stuff for you?
    >


    Because at the end of the day, you outsource all the core of getting
    things working to external tools.

    What happen if they are broken? How can you get the picture and maybe
    provide a patch to fix the "misbehaving" function?

    Having the understanding to do it helps more than letting "magic
    happens" for you all the time.

    --
    Luis Lavena
    Multimedia systems
    -
    Leaders are made, they are not born. They are made by hard effort,
    which is the price which all of us must pay to achieve any goal that
    is worthwhile.
    Vince Lombardi
    Luis Lavena, Nov 22, 2007
    #5
  6. > > Why not just use something like newgem or hoe to build your gem that
    > > will handle this sort of stuff for you?

    >
    > Because at the end of the day, you outsource all the core of getting
    > things working to external tools.
    >
    > What happen if they are broken? How can you get the picture and maybe
    > provide a patch to fix the "misbehaving" function?
    >
    > Having the understanding to do it helps more than letting "magic
    > happens" for you all the time.


    I agree with that, but I used Hoe to generate the file structure. I
    think I got to a point where Hoe stopped being obvious, and then I
    thought, well, if I have to learn something, it's probably faster to
    learn Gems.

    --
    Giles Bowkett

    Podcast: http://hollywoodgrit.blogspot.com
    Blog: http://gilesbowkett.blogspot.com
    Portfolio: http://www.gilesgoatboy.org
    Tumblelog: http://giles.tumblr.com
    Giles Bowkett, Nov 22, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gga
    Replies:
    0
    Views:
    120
  2. Une bévue

    gem spec and C Ruby extension

    Une bévue, Aug 30, 2006, in forum: Ruby
    Replies:
    0
    Views:
    77
    Une bévue
    Aug 30, 2006
  3. Austin 7873
    Replies:
    5
    Views:
    175
    Eric Hodel
    Jan 27, 2007
  4. Andrew Chen
    Replies:
    1
    Views:
    180
    David Chelimsky
    Mar 25, 2008
  5. Jakub Flaška
    Replies:
    0
    Views:
    322
    Jakub Flaška
    Mar 2, 2011
Loading...

Share This Page