1

I am getting the following error when i am trying to edit the image in rails admin. I am using AWS S3 for image storage. Please can anyone help me in this issue.

App 16883 stderr: [ 2014-07-22 13:29:10.2777 16899/0x00000002f00c38(Worker 1) utils.rb:72 ]: *** Exception ArgumentError in Rack application object (could not find a temporary directory) (process 16899, thread 0x00000002f00c38(Worker 1)):
App 16883 stderr:   from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tmpdir.rb:34:in `tmpdir'
App 16883 stderr:   from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tmpdir.rb:105:in `tmpdir'
App 16883 stderr:   from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tmpdir.rb:137:in `create'
App 16883 stderr:   from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tempfile.rb:136:in `initialize'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/multipart/parser.rb:104:in `new'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/multipart/parser.rb:104:in `get_current_head_and_filename_and_content_type_and_name_and_body'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/multipart/parser.rb:19:in `block in parse'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/multipart/parser.rb:17:in `loop'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/multipart/parser.rb:17:in `parse'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/multipart.rb:25:in `parse_multipart'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/request.rb:377:in `parse_multipart'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/request.rb:203:in `POST'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:26:in `method_override'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:14:in `call'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/static.rb:64:in `call'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:511:in `call'
App 16883 stderr:   from /var/www/proj_folder/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:97:in `call'
App 16883 stderr:   from /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
App 16883 stderr:   from /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
App 16883 stderr:   from /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
App 16883 stderr:   from /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/lib/phusion_passenger/request_handler.rb:448:in `block (3 levels) in start_threads'
[Tue Jul 22 13:29:10.278504 2014] [core:error] [pid 16796:tid 140717607311104] [client 117.207.82.237:39405] End of script output before headers: admin

I also referred some previous question asked but no luck.

  1. Ruby: Could not find a temporary directory
  2. Rails could not find a temporary directory (ArgumentError)

I also tried to setup environment for tm directory https://help.ubuntu.com/community/EnvironmentVariables

Also when I start running my app on port 3000 it is saving the images properly.

Community
  • 1
  • 1

0 Answers0