Search code examples
ruby-on-rails-3herokucompass-sass

Permission denied for a css when deploying to heroku


I have a sample app that is using compass gem including blueprint. I just deployed this app on heroku for the first time and I'm seeing the following error in heroku logs

Errno::EACCES (Permission denied - /app/public/stylesheets/ie.css):

Is there something special required in my rails app that will make this error go away? I'm assuming it's coming because I'm using the compass gem...


Solution

  • Do a compass compile before deploying to heroku.

    Also, in your production.rb, add the following line:

    Sass::Plugin.options[:never_update] = true
    

    This will prevent compass from compiling css at runtime (since heroku does not allow writes on filesystem)