When creating a new refinerycms app on a windows machine, I am getting a "Permission Denied" error while running rake db:开发者_开发技巧migrate
. See below (some output truncated)
Setting up your development database..
Running: cmd /c cd "D:\NewInstantRails\InstantRails-2.0-win\rails_apps
\my-app" && D:\NewInstantRails\InstantRails-2.0-win\rubies\Ruby192\bin
\ruby -S rake -f "D:\NewInstantRails\InstantRails-2.0-win\rails_apps\my-
app\Rakefile" db:migrate
rake aborted!
An error has occurred, all later migrations canceled:
Permission denied - D:/NewInstantRails/InstantRails-2.0-win/rails_apps/
my-app/tmp/index/development/Page/size
D:/NewInstantRails/InstantRails-2.0-win/rubies/Ruby192/lib/ruby/1.9.1/
pathname.r
b:776:in `read'
RefineryCMS uses acts_as_indexed and I think this permission error has something to do with reading or writing these indexes in the tmp folder.
It appears that Windows does not support File#flock, not calling on this prevents errors from appearing, though does lose the security of locking on the Windows platform.
精彩评论