Padrino, compass and heroku read-only file system

I really like how padrino "just works" with the compass, but I have a few questions since I'm going to use heroku (and their read-only file system) for hosting

  • From the point of view of things, the padrino / compass compiler compiles sass only if the changes have been made to the sass file and the user is on the server. It's true?

  • If so, then I am right in thinking that I don’t have to worry about the compass trying to write to the file system when the application is in working mode, since I will not make any changes to my sass files when they are on server?

  • Are there other situations besides changes made to sass files, which will cause padrino / compass to be written to the file system?

  • If the assumption I make in question 2 is incorrect, then how can I prevent the padrino / compass from writing to the file system?

Nathan Weisenbaum (from the glory of Sass) advised me to use Sass :: Plugin :: Rack when combining Sinatra, Sassi, Compass and heroku, but after much deliberation, I decided that the best option (at least for my needs) was to prevent sass from doing any server side compilation by linking to my static css files without causing sass on my routes.

I noticed that compass_plugin.rb (created by the padrin generator) requires "Sass: Plugin :: Rack"

, , .

[ ]

+3
3

padrino mailing, .

if Padrino.env == :production
   Sass::Plugin.options[:never_update] = true
end

# right before
Compass.configure_sass_plugin!
Compass.handle_configuration_change! 

+4

Rails Compass, , , , . " , - ", .

, , css . .

+1

Heroku recently posted a blog post Using Compass on Heroku , in which users are encouraged to use the directory tmpfor compiled style sheets.

+1
source

Source: https://habr.com/ru/post/1757930/


All Articles