3

I'm uploading my Rails proyect to a Ubuntu Server running 12.04LTS and I can't seem to fix this issue! Whether I do a bundle install or try to use the whenever gem I get that error! I've read a lot but still I'm unable to fix it

/lib/ruby/2.0.0/tmpdir.rb:34:in `tmpdir': could not find a temporary directory (ArgumentError)

And my ls -la of the / folder Error

Any ideas? P.s I tried chmod -R 777 on /tmp with no luck

2 Answers2

6

The short answer is to just run this like @hagello suggests.

chmod +t /tmp

Then it should start working again.

Travis Reeder
  • 38,611
  • 12
  • 87
  • 87
3

edit: As suggested in the comments just run

chmod +t /tmp

========

Old answer:

Your Ubuntu installation probably doesn't have TMPDIR set. You should set that variable in your startup.

This link has more information on environment variables in Ubuntu: https://help.ubuntu.com/community/EnvironmentVariables

Waynn Lue
  • 11,344
  • 8
  • 51
  • 76
  • 1
    It is not enough to set TMPDIR to _any_ directory path. The directory must be readable, writeable and either _not_ be writeable or have a sticky bit. Besides, there are alternatives: http://stackoverflow.com/a/31182540/601203. – hagello Jul 02 '15 at 10:55