Forum: Ruby Q: HOWTO: install a gem using rake?

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.
15f985dc1d6a150767736a0c65e9ef35?d=identicon&s=25 Jeremy Henty (Guest)
on 2008-12-17 20:11
(Received via mailing list)
Is there a  standard way to write  a gem install task if  you build it
with GemPackageTask?   AFAICT GemPackageTask doesn't  supply one which
surprises me a little.  I use  'sh "gem install ..."'  and I'm worried
about how portable it is.

(BTW, would this  be an appropriate question for  the rake-devel list?
If so then I'll sign up.)

Thanks,

Jeremy Henty
15f985dc1d6a150767736a0c65e9ef35?d=identicon&s=25 Jeremy Henty (Guest)
on 2008-12-18 13:16
(Received via mailing list)
On 2008-12-17, Aldric Giacomoni <"aldric[remove]"@trevoke.net> wrote:
> Jeremy Henty wrote:
>> I use 'sh "gem install ..."'  and I'm worried about how portable it
>> is.
>>
> Surrounding a command with backticks sends it out to the OS.
> e.g. `ping localhost`

Sorry, I  didn't make it  clear that this  "sh" is a Rake  method that
does  (I  imagine) pretty  much  the  same  thing as  backticks.   The
Rakefiles  of  other gems  often  use  more complicated  constructions
involving Gem::RUBY etc.  and I wonder  if this is to make things more
portable.  Sadly I  can't Google up anything that  says "the right way
to do  it is  ...  and here's  why".  It  seems that most  people bake
their own  solution without giving their reasons.   Unless I'm missing
something, of course.

Regards,

Jeremy Henty
This topic is locked and can not be replied to.