Created
April 3, 2013 08:55
-
-
Save nandosola/5299581 to your computer and use it in GitHub Desktop.
Torquebox needs its tmpdirs to be set by applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#... requires | |
ENV['RACK_ENV'] ||= 'development' | |
# This tempdir stuff is important for Torquebox deployments | |
(tmp = '.' | |
dirs = [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'], '/tmp', tmp] | |
for dir in dirs | |
unless dir.nil? | |
stat = File.stat(dir) | |
if stat.directory? and stat.writable? and !stat.world_writable? | |
puts "**** tmpdir will be #{dir}" | |
break | |
end | |
end | |
end) if %w(production staging).include?ENV['RACK_ENV'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TorqueBox.configure do | |
web do |web| | |
web.context '/fileserver' | |
end | |
ruby do | |
version '1.9' | |
end | |
environment do | |
TMPDIR '/var/torquebox' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment