Freezing rails in windows brings up a "permission denied"


#1

Hi,

it’s the first time for me to get a rails-application running on
webspace, so I have to freeze my application to include my gems and
rails.
I tried many times with new and existing applications but always got
an error. I searched in the internet but it seems I’m the only one
with this (or the only rails programmer using windows…).

Maybe it’s just a stupid thing which I forgot to do, but I don’t know
how to fix this, maybe someone can help me.

Thanks in advance!


C:\Workspace\rails\test3>rake rails:freeze:gems --trace
(in C:/Workspace/rails/test3)
** Invoke rails:freeze:gems (first_time)
** Execute rails:freeze:gems
Freezing to the gems for Rails 2.2.2
rm -rf vendor/rails
mkdir -p vendor/rails
cd vendor/rails
Unpacked gem: ‘C:/Workspace/rails/test3/vendor/rails/
activesupport-2.2.2’
mv activesupport-2.2.2 activesupport
Unpacked gem: ‘C:/Workspace/rails/test3/vendor/rails/
activerecord-2.2.2’
mv activerecord-2.2.2 activerecord
rm -rf vendor/rails
rake aborted!
Permission denied - activerecord-2.2.2 or activerecord
C:/Ruby/lib/ruby/1.8/fileutils.rb:505:in rename' C:/Ruby/lib/ruby/1.8/fileutils.rb:505:inmv’
C:/Ruby/lib/ruby/1.8/fileutils.rb:1395:in fu_each_src_dest' C:/Ruby/lib/ruby/1.8/fileutils.rb:1411:infu_each_src_dest0’
C:/Ruby/lib/ruby/1.8/fileutils.rb:1393:in fu_each_src_dest' C:/Ruby/lib/ruby/1.8/fileutils.rb:494:inmv’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1072:in mv' C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/framework.rake:28 C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/framework.rake: 26:ineach’
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/framework.rake:26
C:/Ruby/lib/ruby/1.8/fileutils.rb:121:in chdir' C:/Ruby/lib/ruby/1.8/fileutils.rb:121:inchdir’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1072:in chdir' C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/framework.rake:25 C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:incall’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in execute' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:ineach’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in execute' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:ininvoke_with_call_chain’
C:/Ruby/lib/ruby/1.8/monitor.rb:242:in synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:ininvoke_with_call_chain’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in invoke' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:ininvoke_task’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:ineach’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:instandard_exception_handling’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in
top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:inrun’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
standard_exception_handling' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:inrun’
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
C:/Ruby/bin/rake:19:in `load’
C:/Ruby/bin/rake:19


#2

rm -rf vendor/rails
rake aborted!
Permission denied - activerecord-2.2.2 or activerecord
C:/Ruby/lib/ruby/1.8/fileutils.rb:505:in rename' C:/Ruby/lib/ruby/1.8/fileutils.rb:505:inmv’

can you delete vendor/rails?
Sometimes unzipping files gives them ‘weird’ permissions–copying the
entire directory structure to a new directory sometimes helps, sometimes
opening cygwin bash and running chmod a+rwx * -R sometimes helps. Do
what you can :slight_smile:
-=r