Search code examples
ruby-on-railsruby-on-rails-3.1workflowasset-pipelinecompass-sass

What's the best workflow for designers to work with the Rails 3.1 asset pipeline


I'm working in a resources heavy Rails 3.1.2 app as a frontend/designer and i'm constantly changing stylesheets (compass), reloading browser, ...

Since we switched to asset pipeline, it compiles scss, js, ... and it just take ages (30s/page). Impossible to work fast as a designer in such an environment.

Here my dev config:

# from dev_tweaks gem
config.dev_tweaks.autoload_rules do
  keep :all

  skip '/favicon.ico'
  # Commented out to prevent scss caching
  # skip :assets
  skip :xhr
  keep :forced
end

config.assets.debug = false
config.cache_classes = false

Is there a magical config/settings/gem that would allow to compile only what has been changed?


Solution

  • Maybe serve (source) is something for you? It is a small project that will allow to create a design for a rails app, but without a complete rails app. So this will enable to work fast.

    Of course, you do add an extra step: when your design is ready, it still has to be copied over to your actual rails app. But I think that is ok. Just use serve during the designing phase.

    Hope this helps.