开发者

Extract archive in ruby on windows

开发者 https://www.devze.com 2023-02-09 00:22 出处:网络
I am having trouble extracting a zip-archive on a windows machine. I am currently working on an extension for buildr, which works fine on Linux and Mac OS X.

I am having trouble extracting a zip-archive on a windows machine. I am currently working on an extension for buildr, which works fine on Linux and Mac OS X. I am using a built-in function in buildr to extract my archive which is built on top开发者_StackOverflow of rubyzip but rubyzip fails on windows with:

NotImplementedError : symlink() function is unimplemented on this machine

Anyone knows how I can make this work on Windows.


Install unzip, put it in your system path, and then simply

myfile = "foo.zip"
`unzip #{myfile}`

The `...` command in Ruby allows you to execute system commands.

0

精彩评论

暂无评论...
验证码 换一张
取 消