0
我已經用Docker組合Docker化了一個非常簡單的Rails 5應用程序(及其PostgreSQL數據庫)。當我在本機運行它,它工作正常,但如果我運行的泊塢容器內,並轉到主頁,我收到以下錯誤:Rails在Docker容器中運行時找不到臨時目錄
web_1 | ActionView::Template::Error (could not find a temporary directory):
web_1 | 9: <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
web_1 | 10: <%= csrf_meta_tags %>
web_1 | 11:
web_1 | 12: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
web_1 | 13: <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
web_1 | 14: <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
web_1 | 15: </head>
web_1 |
web_1 | app/views/layouts/application.html.erb:12:in `_app_views_layouts_application_html_erb__1331678602890151203_70235895526140'
web_1 | Rendering /usr/local/bundle/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout
web_1 | Rendering /usr/local/bundle/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb
web_1 | Rendered /usr/local/bundle/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.5ms)
web_1 | Rendering /usr/local/bundle/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
web_1 | Rendered /usr/local/bundle/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.6ms)
web_1 | Rendering /usr/local/bundle/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
web_1 | Rendered /usr/local/bundle/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms)
web_1 | Rendered /usr/local/bundle/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (35.4ms)
我在其他職位讀,它可能取決於關於容器內/tmp
目錄的權限,所以我給了它完全的權限,我也試着指定容器的TMPDIR
目錄,但它沒有奏效。
任何想法?