Skip to content

Loading…

Creating cache folders fails on Windows #40

Open
slavikdev opened this Issue · 0 comments

1 participant

@slavikdev

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

https://github.com/rtomayko/rack-cache/blob/master/lib/rack/cache/metastore.rb#L216

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

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.