Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compass on Win using relative paths outside of Compass project dir

I was using Sass on an existing site and decided to get Compass up and running on Win7x64. Ruby, HAML, Compass all installed fine (afaik).

I have a project at c:\project with a static files served out of c:\project\static with a directory structure that has to stay the same. I went into c:\project\static and ran this:

compass create css-compass

This resulted in the following dir structure

c:\project\static\css (previously existed; output css)
c:\project\static\css-sass (previously existed; source css)
c:\project\static\css-compass (the new compass dir created by compass)    

And here is my config.rb:

# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "..\\css"
sass_dir = "..\\css-sass"
images_dir = "images"
javascripts_dir = "javascripts"

When I go to c:\project\static and run compass watch compass-css, I get the following error:

Nothing to compile. If you're trying to start a new project, you have left off the directory argument. Run "compass -h" to get help.

However, if I create symlinks inside c:\project\static\css-compass from css->..\css and css-sass => ..\css-sass then everything works just fine.

What the what?

like image 639
jjt Avatar asked Dec 12 '25 07:12

jjt


1 Answers

facepalm

Apparently you need to set relative_assets = true in your config.rb file. Why this isn't the default is beyond me. Oh well!

like image 124
jjt Avatar answered Dec 15 '25 00:12

jjt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!