Windows and Rake package task - problems with tar

J

Jferg

Ever see an issue with trying to package a gem like this: "rake
gem:package"? It tries to use a Ruby Rake task (package task) which
fails on "sh tar zcvf <target tgz> <gem src dir>"?

It seems to be part of base Rake. On windows I get errors with tar
not liking the "z" switch. Complains about "remote files", what
remote files? I have looked for various tar implementations that run
on Windows, and so far no luck.

Has anyone else found out how to get this work on Windows XP? So far,
my option is to hack the Rake code to not use "z", seems to create an
uncompressed gem which I can then install and uninstall correctly. I
don't like this hack and I haven't found the (obvious?) place in
documentation to do what I need to do without the hack.
 
L

Luis Lavena

Ever see an issue with trying to package a gem like this: "rake
gem:package"?   It tries to use a Ruby Rake task (package task) which
fails on "sh tar zcvf <target tgz> <gem src dir>"?

It seems to be part of base Rake.  On windows I get errors with tar
not liking the "z" switch.  Complains about "remote files", what
remote files?  I have looked for various tar implementations that run
on Windows, and so far no luck.

Have you tried gnuwin32.sf.net tar?

http://gnuwin32.sf.net/

Or you can try RubyInstaller DevKit and rename bsdtar to "tar"
Has anyone else found out how to get this work on Windows XP?  So far,
my option is to hack the Rake code to not use "z", seems to create an
uncompressed gem which I can then install and uninstall correctly.  I
don't like this hack and I haven't found the (obvious?) place in
documentation to do what I need to do without the hack.

Actually that tar is not used by the gem package but instead is
generated for support packages like .tar.gz or .tar.bz2

That is configured in the Rakefile of your project and can be turned
off with need_tar = false and need_zip = false

RubyGems will use it's own tar mechanism to package the gem and use
zlib to generate the gz compressed version of the contents.

See this:
http://rake.rubyforge.org/classes/Rake/GemPackageTask.html
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top