views:

40

answers:

1

I'm having an issue with HAML where it is attempting to write to a read-only filesystem (on a Heroku-deployed app).

I can only write to /tmp and /log. How can I configure HAML to write files to the /tmp directory?

Thanks!


Edit:

Output of actual error

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'
+2  A: 

Like Mark commented, I think you mean SASS, not Haml. Here's how to use git commit-hooks to precompile your SASS before deploying to heroku.

EDIT: After full error was posted

Change

= stylesheet_link_tag "reset", "application", "grid", :cache => "base"

to

= stylesheet_link_tag "reset", "application", "grid"

The caching isn't HAML, it's RAILS, and it's doing this on first read.

Jesse Wolgamott
I only have static `.css` files. Is there a way I can see if this is a SASS issue?
macek
The file that haml is trying to write has the component `/stylesheets/` in the path.
Justice
@macek and @justice -- I updated my answer. I think it's a RAILS issue of trying to cache all the stylesheets into one file. Can't do that on heroku.
Jesse Wolgamott