Skip to content

Instantly share code, notes, and snippets.

@gertig
Forked from mrrooijen/gist:716284
Created February 26, 2011 01:50
Show Gist options
  • Save gertig/844844 to your computer and use it in GitHub Desktop.
Save gertig/844844 to your computer and use it in GitHub Desktop.
##
# Inside: Rails.root/config/compass.rb
if Rails.env.production?
css_dir = "tmp/stylesheets/compiled"
else
css_dir = "public/stylesheets/compiled"
end
##
# Inside: Rails.root/config/initializers/compass.rb
if Rails.env.production?
require 'fileutils'
FileUtils.mkdir_p(Rails.root.join("tmp", "stylesheets", "compiled"))
end
##
# Inside: Rails.root/config.ru
require ::File.expand_path('../config/environment', __FILE__)
if Rails.env.production?
use Rack::Static, :urls => ["/stylesheets/compiled"], :root => "tmp" #FOR COMPASS
end
run YouAppName::Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment