From: James Britt Date: 2008-08-25T09:29:45+09:00 Subject: Re: gem unpack --target usage Erik Hollensbe wrote: > James Britt wrote: >> Erik Hollensbe wrote: >>> James Britt wrote: >>>> I'm trying to unpack a gem into a particular directory, but cannot get >>>> the --target option to work. >>> gem unpack foo.gem -- --target foo # works here. >> I just tried it. It "works" by unpacking the gem into the current >> directory, completely ignoring the --target option. > > What version of rubygems do you have? I'm using 1.2.0, on Kubuntu, running ruby 1.8.6 (2008-08-08 patchlevel 286) [i686-linux] I don't have a 'foo.gem' file to try; I have RedCloth installed as a gem and want to unpack it to a particular location. I can unpack to the current directory if I omit any --target option. So, this works: james@james06:~$ pwd /home/james james@james06:~$ gem unpack RedCloth Unpacked gem: '/home/james/RedCloth-3.0.4' james@james06:~$ This fails james@james06:~$ gem unpack RedCloth --target /tmp/RC ERROR: While executing gem ... (Gem::CommandLineError) Too many gem names (RedCloth, /tmp/RC); please specify only one james@james06:~$ Using the extra '--' as in your example acts as if I pass no --target option: james@james06:~$ gem unpack RedCloth -- --target /tmp/RC Unpacked gem: '/home/james/RedCloth-3.0.4' If I copy the actual gem file to my working directory: james@james06:~$ gem unpack RedCloth-3.0.4.gem -- --target /tmp/RC Unpacked gem: '/home/james/RedCloth-3.0.4' james@james06:~$ gem unpack RedCloth-3.0.4.gem --target /tmp/RC ERROR: While executing gem ... (Gem::CommandLineError) Too many gem names (RedCloth-3.0.4.gem, /tmp/RC); please specify only one BTW, why do you use the extra '--' in your example? (Not that it helps me either way.) -- James Britt www.happycamperstudios.com - Wicked Cool Coding www.jamesbritt.com - Playing with Better Toys www.ruby-doc.org - Ruby Help & Documentation www.rubystuff.com - The Ruby Store for Ruby Stuff