Page 1 of 1

Ruby - Permission Denied in Delete or Rename

Posted: Thu Apr 16, 2009 10:29 pm
by Jonah Bron
Hello, world!

I'm thoroughly stumped. :(

I have Ruby installed on my dad's computer, and cannot use it to rename or delete files. All other features work well. It only says "Permission Denied".

Any thoughts?

Thanks!

Re: Ruby - Permission Denied in Delete or Rename

Posted: Thu Apr 16, 2009 10:38 pm
by Benjamin
What operating system are you using?

Re: Ruby - Permission Denied in Delete or Rename

Posted: Thu Apr 16, 2009 10:49 pm
by Jonah Bron
Windows XP. Just discovered that I had it open earlier in the script, and forgot to close it. But, now I am trying to delete a folder, and it is giving me the same problem. It was made with FileUtils.mkdir_p, and then a file was put into it with File.move. I don't think that either of those require you to close the file.

Thanks

Re: Ruby - Permission Denied in Delete or Rename

Posted: Thu Apr 16, 2009 10:56 pm
by Benjamin
What is the error message?

Re: Ruby - Permission Denied in Delete or Rename

Posted: Thu Apr 16, 2009 11:14 pm
by Jonah Bron
c:/Program Files/ruby/lib/ruby/1.8/tk.rb:1354:in `callback': Errno::EACCES: Permission denied - C:\Documents and Settings\User\My Documents\New Folder (Errno::EACCES)

Re: Ruby - Permission Denied in Delete or Rename

Posted: Thu Apr 16, 2009 11:21 pm
by Benjamin
Interesting. See if this helps, there seems to be numerous solutions and variants of this issue:

http://www.google.com/search?hl=en&clie ... tnG=Search

Re: Ruby - Permission Denied in Delete or Rename

Posted: Thu Apr 16, 2009 11:34 pm
by Jonah Bron
Whoa! This post is the fourth result. 8O

Re: Ruby - Permission Denied in Delete or Rename

Posted: Fri Apr 17, 2009 2:44 pm
by Jonah Bron
Uh-duh! I was trying to use the File class to delete a directory, instead of the Dir class. :crazy:

Thanks!

Re: Ruby - Permission Denied in Delete or Rename

Posted: Fri Apr 17, 2009 3:04 pm
by Benjamin
Jonah Bron wrote:Whoa! This post is the fourth result. 8O
Yeah, google is getting pretty quick!