green_shoes
green_shoes copied to clipboard
Error raised when attempting to run a 2nd instance of a green_shoes application from another thin client
The following error was observed while attempting to execute my green_shoes application from a thin client when another instance of the green_shoes application is already running in another thin client.
error while writing to output stream
/usr/local/lib/ruby/gems/2.1.0/gems/green_shoes-1.1.374/lib/shoes/ruby.rb:130:in `delete': Operation not permitted @ unlink_internal - /tmp/__green_shoes_temporary_file__ (Errno::EPERM)
from /usr/local/lib/ruby/gems/2.1.0/gems/green_shoes-1.1.374/lib/shoes/ruby.rb:130:in `block in '
Please would you modify the file lib/green_shoes.rb containing the statement
TMP_PNG_FILE = File.join(Dir.tmpdir, '__green_shoes_temporary_file__')
to use a unique temporary file.
A unique temporary file can be created using the tempfile gem e.g.
require 'tempfile'
tmpfile = Tempfile.new('green_shoes_temporary_file')
puts tmpfile.path
#=> /tmp/green_shoes_temporary_file20160510-21215-1tl5lfr
Note: This bug only occurs when attempting to execute instances of a green shoes application from multiple thin clients connected to a Linux Thin Server Project (LTSP) setup.