Forum: Ruby create folder ok delete not

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9aa1e92a0ebb17fdaad2fa39b4c52b8a?d=identicon&s=25 misiek (Guest)
on 2006-03-01 23:33
(Received via mailing list)
it works

public_dir = File.join(RAILS_ROOT, "public/images")
dir = File.join( public_dir, "#{new_property.id}")
FileUtils.mkpath(dir) unless File.exists?(dir)


it not


public_dir = File.join(RAILS_ROOT, "public/images")
folder = "118"
dir = File.join( public_dir, "#{folder}")
File.unlink(dir)

its not the same ?

I got error

Is a directory -
/home/maugustyniak/workspace/new_bjbpartners/public/../config/../public/images/118
9aa1e92a0ebb17fdaad2fa39b4c52b8a?d=identicon&s=25 misiek (Guest)
on 2006-03-01 23:38
(Received via mailing list)
sorry never mind its so stupid I think I am tired
dir.delete of course
This topic is locked and can not be replied to.