Skip to content


Creating cache folders fails on Windows #40

slavikdev opened this Issue · 0 comments

1 participant


I use Windows and had weird issue with Radiant CMS, which uses rack-cache gem.
The following code causes the issue:

def initialize(root="/tmp/rack-cache/meta-#{ARGV[0]}")
   @root = File.expand_path(root)
   FileUtils.mkdir_p(root, :mode => 0755)

You see, FileUtils.mkdir_p( '/tmp/foo/bar' ) creates C:/tmp/foo/bar on Windows (If my current drive is C).
Of course that’s not possible on hosting environments. There are no permissions.
Generally on shared-hosting environment you have access to application folder only. It would be nice to change that behaviour so that folders are created inside Rails app root.

Please let me know if you need any help. I could submit a patch.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.