Rails could not find a temporary directory (Argume

2020-07-23 04:22发布

问题:

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

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

回答1:

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



回答2:

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

chmod +t /tmp

Then it should start working again.