#16 new
T.J. Crowder

"Permission Denied" building via sprockets on Windows

Reported by T.J. Crowder | June 6th, 2009 @ 12:22 PM

Hi,

Trying to build Prototype's docs via rake doc, I run into a "permission denied" problem on Windows that doesn't seem to happen on other OS's. Details in this thread[1] in the Prototype Core discussion group.

The error occurs in concatenation.rb, in the commented-out line below:

 def save_to(filename)
  timestamp = mtime
  File.open(filename, "w") { |file| file.write(to_s) }
  # [This breaks on Windows] File.utime(timestamp, timestamp, filename)
  true
end

Commenting that line out (as above) allows building the docs on Windows. Not knowing anything about sprockets (or indeed Ruby), I don't know why it's there, but I guess you can't use File.utime on an open file on Windows (NTFS partition). It may be that simply putting the utime call above the open call would have the end effect desired without causing a Windows problem.

[1] http://groups.google.com/group/prototype-core/browse_thread/thread/...

T.J. Crowder
tj / crowder software / com

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

JavaScript dependency management and concatenation
<a href="http://getsprockets.org/">http://getsprockets.org/</a>

People watching this ticket

Pages