Cache write error on Ubuntu 8.04
-
Luca Guidi
Ok, I tried with a virtualized Ubuntu 8.04.1 (Parallels Desktop), and both with ActiveSupport 2.1.0 and 2.1.1, it works for me.
I also tried with irb to use File#atomic_write, and everything it's ok.
-
max_dev
Is because the temp directory is not on the same filesystem as the file trying to write (virtualized is on the same, I suppose):
http://api.rubyonrails.com/class...
I think a:
File.atomic_write("uno.txt", "./") do |file|
file.write("hello")end
specifying a explicit different temporary directory (in the same filesystem) may solve the issue
-
Luca Guidi
Theoretically, Dir#tmpdir should return the first writeable directory declared in certain env variables. If none of those directories are available it should return the current working one. http://www.ruby-doc.org/core/cla...
I applied your fix, I don't care about the tmp dir, for me it's OK to perform all the operations inside ~/.rails/plugins.
I build and attached the gem, please can you download, install and try if it works?
Thank you!
-
Luca Guidi
- State changed from new to resolved
(from [8e28464043f09c42007e79edead46f3b0d5cc851]) Force File#atomic_write to use the current directory as temp path. [#16 state:resolved] http://github.com/jodosha/sashim...
-
max_dev
Deleted and installed jodosha-sashimi:
gem install jodosha-sashimi --source=http://gems.github.com
then:
sashimi install git://github.com/jodosha/click-to-globalize.git
Nothing changed in code:
File.atomic_write(cache_file) do |file| file.write(plugins.to_yaml) endsame error.
-
Luca Guidi
You should install the attached gem with:
(sudo) gem install --local sashimi-0.2.1.gem
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
