Essentially code tells me that the unpacking is successful but when the
code tries to rename the file through "mv activesupport-2.3.2
activesupport" it fails with "permission denied". Here are some things
to note.
1. Running the freeze:gems task as below creates the vendor/rails and
then after unpacking it creates the activesupport-2.3.2 directory. That
directory contains *part* of the directory structure of the actual
activesupport-2.3.2 and with no files in any directory
2. I run the command "ren activesupport-2.3.2 activesupport" and it
works find - don't understand why that rename fails through the script
which gets called through fileutils.rb through the mv command (I will
have to dig into that next)
3. I cleaned out the vendor/rails directory and manually ran the "gem
unpack activesupport" and it created a *complete* copy of the
activesupport-2.3.2 directory structure *with the files*
4. Sounds like perms command is more for a linux box - doesn't seem to
be applicable for my XP box. The directory has read only permissions
when I check in the directory properties
5. I have admin privileges on my laptop - never had any issue with any
install so I don't understand what the "permission denied" error is
about. It almost sounds like the script is running under another user's
privileges but that doesn't sound right. Or is that possible?
I will continue to dig but I have already wasted so much time on
something that was supposed to be so trivial that it is hurting.
Thanks for your help.
-S
D:\myPadosi\Trunk>rake rails:freeze_2_3_2:gems_2_3_2 --trace
(in D:/myPadosi/Trunk)
** Invoke rails:freeze_2_3_2:gems_2_3_2 (first_time)
** Execute rails:freeze_2_3_2:gems_2_3_2
Statring gem freeze with deps =
actionpackactiverecordactionmaileractivesupportactiveresource from 2.3.2
Freezing to the gems for Rails 2.3.2
rm -rf vendor/rails
mkdir -p vendor/rails
cd vendor/rails
---> g.name = activesupport
Unpacked gem: 'D:/myPadosi/Trunk/vendor/rails/activesupport-2.3.2'
--->Unpacked successfully - moving activesupport-2.3.2 to activesupport
mv activesupport-2.3.2 activesupport
rm -rf vendor/rails
rake aborted!
Permission denied - activesupport-2.3.2 or activesupport
c:/ruby/lib/ruby/1.8/fileutils.rb:501:in `rename'
c:/ruby/lib/ruby/1.8/fileutils.rb:501:in `mv'
c:/ruby/lib/ruby/1.8/fileutils.rb:1379:in `fu_each_src_dest'
c:/ruby/lib/ruby/1.8/fileutils.rb:1395:in `fu_each_src_dest0'
c:/ruby/lib/ruby/1.8/fileutils.rb:1377:in `fu_each_src_dest'
c:/ruby/lib/ruby/1.8/fileutils.rb:490:in `mv'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1070:in `mv'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/framework.rake:31
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/framework.rake:27:in
`each'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/framework.rake:27
c:/ruby/lib/ruby/1.8/fileutils.rb:121:in `chdir'
c:/ruby/lib/ruby/1.8/fileutils.rb:121:in `chdir'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1070:in `chdir'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/framework.rake:26
--
Posted via http://www.ruby-forum.com/.
If anyone has any thoughts/ideas - I look forward to it.
-S
D:\myPadosi\Trunk\vendor\rails>irb
irb(main):001:0> require 'fileutils.rb'
=> true
irb(main):003:0> include FileUtils
=> Object
irb(main):004:0> mv("activesupport-2.3.2", "activesupport")
=> 0
irb(main):005:0>
"Permission denied - activesupport-2.2.2 or activesupport"
I added some debug code to the mv function in fileUtils but I can't get
any additional information.
1. How can I debug rake tasks? Is there a way to set breakpoints in
fileutils.rb when "rake rails:freeze:gems" runs so I can inspect the
data there?
2. How can I get information about what user is the command "rake
rails:freeze:gems" running under? I am system admin on my box so I just
don't understand the permission denied error I am seeing
I also tried to go down the other path I had tried earlier to freeze
rails with "rake rails:freeze:edge TAG=rel_2-2-2". It looks like there
the system can't find an unzip executable - I have Winzip on my box but
not sure if that matters. I saw in another post
(http://www.question-defense.com/2009/04/02/error-freezing-rails-usr-local-lib-ruby-1-8-fileutils-rb-1297-command-not-found-unzip-railszip/)
that doing a "yum install unzip" on a linux box apparently solved this
kind of problem. Is there an equivalent "unzip" install for XP box that
might address this aspect of the problem?
D:\TestRails2>rake rails:freeze:edge TAG=rel_2-2-2 --trace
(in D:/TestRails2)
** Invoke rails:freeze:edge (first_time)
** Execute rails:freeze:edge
cd vendor
Downloading Rails from
http://dev.rubyonrails.org/archives/rails_edge.zip
Unpacking Rails
rm -rf rails
---> removed rails directory successfully
c:/ruby/bin/rake.bat: No such file or directory - unzip rails.zip
---> unzipped rails.zip
rm -f rails.zip
rm -f rails/Rakefile
rm -f rails/cleanlogs.sh
rm -f rails/pushgems.rb
rm -f rails/release.rb
touch rails/REVISION_7ce0778a1516110cf8015e59e2e8fac15032379c
rake aborted!
No such file or directory -
rails/REVISION_7ce0778a1516110cf8015e59e2e8fac15032379c
I don't really know what else to do to debug this problem. Could use
some help/pointers here.
Thanks,
-S
I can go to sleep tonight with my mind at peace - at least for now!
Appreciate the suggestion/help Matt.
D:\myPadosi\Trunk>rake rails:freeze:gems
(in D:/myPadosi/Trunk)
Freezing to the gems for Rails 2.2.2
rm -rf vendor/rails
mkdir -p vendor/rails
cd vendor/rails
Unpacked gem: 'D:/myPadosi/Trunk/vendor/rails/activesupport-2.2.2'
--> Going to sleep for 1 seconds
--> Waking from sleep and about to start mv
mv activesupport-2.2.2 activesupport
Unpacked gem: 'D:/myPadosi/Trunk/vendor/rails/activerecord-2.2.2'
--> Going to sleep for 1 seconds
--> Waking from sleep and about to start mv
mv activerecord-2.2.2 activerecord
Unpacked gem: 'D:/myPadosi/Trunk/vendor/rails/actionpack-2.2.2'
--> Going to sleep for 1 seconds
--> Waking from sleep and about to start mv
mv actionpack-2.2.2 actionpack
Unpacked gem: 'D:/myPadosi/Trunk/vendor/rails/actionmailer-2.2.2'
--> Going to sleep for 1 seconds
--> Waking from sleep and about to start mv
mv actionmailer-2.2.2 actionmailer
Unpacked gem: 'D:/myPadosi/Trunk/vendor/rails/activeresource-2.2.2'
--> Going to sleep for 1 seconds
--> Waking from sleep and about to start mv
mv activeresource-2.2.2 activeresource
Unpacked gem: 'D:/myPadosi/Trunk/vendor/rails/rails-2.2.2'
--> Going to sleep for 1 seconds
--> Waking from sleep and about to start mv
cd -