spree/spree — Issue #1012: No such file or directory - tmp/cache/001/000 after 0.70 -> 1.0 upgrade
Author: radar
Created: 2012-01-24 04:33:20+00:00
State: open

After upgrading an application to 1.0 from 0.70 I get this error:

```text
/Users/ryan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:519:in `rename'
/Users/ryan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:519:in `block in mv'
/Users/ryan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1515:in `block in fu_each_src_dest'
/Users/ryan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1531:in `fu_each_src_dest0'
/Users/ryan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1513:in `fu_each_src_dest'
/Users/ryan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:508:in `mv'
activesupport (3.1.3) lib/active_support/core_ext/file/atomic.rb:35:in `atomic_write'
activesupport (3.1.3) lib/active_support/cache/file_store.rb:102:in `write_entry'
activesupport (3.1.3) lib/active_support/cache/strategy/local_cache.rb:140:in `write_entry'
activesupport (3.1.3) lib/active_support/cache.rb:364:in `block in write'
activesupport (3.1.3) lib/active_support/cache.rb:520:in `instrument'
activesupport (3.1.3) lib/active_support/cache.rb:362:in `write'
/Users/ryan/.rvm/gems/ruby-1.9.3-p0/bundler/gems/spree-b9748925475c/core/app/models/spree/preferences/store.rb:59:in `block in load_preferences'
/Users/ryan/.rvm/gems/ruby-1.9.3-p0/bundler/gems/spree-b9748925475c/core/app/models/spree/preferences/store.rb:58:in `each'
/Users/ryan/.rvm/gems/ruby-1.9.3-p0/bundler/gems/spree-b9748925475c/core/app/models/spree/preferences/store.rb:58:in `load_preferences'
/Users/ryan/.rvm/gems/ruby-1.9.3-p0/bundler/gems/spree-b9748925475c/core/app/models/spree/preferences/store.rb:17:in `initialize'```

I believe this has something to do with the preference changes in 1.0. I don't know why the write method (the last point where it goes "outside" of Spree) is not creating a directory before attempting to write to it.

Will investigate further. This issue is just for tracking purposes.