我遇到HAML的问题,它试图写入只读文件系统(在Heroku部署的应用程序上)。
我只能写信给/tmp
和/log
。如何配置HAML以将文件写入/tmp
目录?
谢谢!
输出实际错误
Started GET "/" for <ip> at Sun Oct 03 13:19:42 -0700 2010
Processing by WelcomeController#index as HTML
Rendered welcome/index.html.haml within layouts/application (5.6ms)
Completed in 10ms
ActionView::Template::Error (Read-only file system - /disk1/home/slugs/305306_d9977a4_8922/mnt/public/stylesheets/.permissions_check.23729009697080.19743.369932 - Heroku has a read-only filesystem. See http://docs.heroku.com/constraints#read-only-filesystem):
3: %html
4: %head
5: %title= title
6: = stylesheet_link_tag "reset", "application", "grid", :cache => "base"
7: = javascript_include_tag :defaults
8: = csrf_meta_tag
9:
app/views/layouts/application.html.haml:6:in `_app_views_layouts_application_html_haml___661334860_23729045526060_0'
答案 0 :(得分:2)
编辑:发布完整错误后
更改
= stylesheet_link_tag "reset", "application", "grid", :cache => "base"
到
= stylesheet_link_tag "reset", "application", "grid"
缓存不是HAML,它是RAILS,它在第一次读取时执行此操作。