[ruby-core:60662] [ruby-trunk - Bug #9156] Not able to get tmp dir to work with Ruby 2.0.0

From: nobu@...
Date: 2014-02-12 08:07:26 UTC
List: ruby-core #60662
Issue #9156 has been updated by Nobuyoshi Nakada.


MacOS X makes a directory with permission 0700 under `/var/folders` and sets `TMPDIR` to it by default.
Check if it is properly set: `ls -ld "$TMPDIR"`


----------------------------------------
Bug #9156: Not able to get tmp dir to work with Ruby 2.0.0
https://bugs.ruby-lang.org/issues/9156#change-45093

* Author: B L
* Status: Feedback
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby-2.0.0-p353
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN
----------------------------------------
I just migrated to Ruby 2.0.0 from 1.9.2 and I'm getting errors when trying to handle files because I can't get tmp directories to work.

If you check this file and look at line 29 you'll see that a check on world_writable? has been added, but the file should not be world writable (prepended by !). So tmp dir are now restricted? What should I do to set up my machine? (I'm using Rails 4)

Here's the error I get:

ArgumentError: could not find a temporary directory
When I try to hit Dir:tmpdir

/home/ben/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tmpdir.rb: in tmpdir
raise ArgumentError, "could not find a temporary directory" if !tmp

Thanks
Ben



-- 
http://bugs.ruby-lang.org/

In This Thread