开发者

Permission denied for a css when deploying to heroku

开发者 https://www.devze.com 2023-03-31 02:39 出处:网络
I have a sample app that is using compass gem including blueprint. I just开发者_JAVA百科 deployed this app on heroku for the first time and I\'m seeing the following error in heroku logs

I have a sample app that is using compass gem including blueprint. I just开发者_JAVA百科 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...


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)


Just set this option to true in config/environments/production.rb and everything will work fine:

config.assets.compile = true


Save ie.css from your local machine, add it into your public/stylesheets folder, and push it up to heroku.

0

精彩评论

暂无评论...
验证码 换一张
取 消