Getting a compass-driven project to work with runcoderun

1 view
Skip to first unread message

thechrisoshow

unread,
Nov 23, 2009, 5:29:37 AM11/23/09
to Compass
I'm having problem getting runcoderun to work with a project that
includes compass.

The specs fall over before it's begun with an error:

rake aborted!
uninitialized constant Sass::Script

I've tried it vendored and non vendored - and also adding the
following line to line 7 at /lib/compass/sass_extensions/functions.rb:
8.:
module Sass::Script;end


Any ideas?
-Chris

thechrisoshow

unread,
Nov 25, 2009, 9:38:43 AM11/25/09
to Compass
So, I eventually resolved this by basically switching off compass for
runcoderun

(specs don't need stylesheets anyway!)

To do this I put something like this in the environment.rb

unless ENV["RUN_CODE_RUN"]
config.gem 'compass'
end

And the problem went away

Chris Eppstein

unread,
Nov 25, 2009, 10:58:05 AM11/25/09
to compas...@googlegroups.com
The original error looks like they have a really old version of haml... Did you try vendoring haml too?

That said, you really shouldn't be compiling stylesheets during test runs. They'll just slow down your tests for relatively little value. Assuming everything loads correctly, you can turn off stylesheet compilation in a Rails app by setting Sass::Plugin.options[:never_update] = true.

For the true test nazi's out there, compass comes with a TestUnit test case class for testing your stylesheets (ensures they compile and have something inside). I use it like this: http://gist.github.com/234185 If other assertions are useful to people, please build them and I'll merge them in ;-)

Chris

P.S. Sorry your message sat in the queue so long, somehow I missed the notice. From now on, you'll go straight through.


--

You received this message because you are subscribed to the Google Groups "Compass" group.
To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/compass-users?hl=en.



Reply all
Reply to author
Forward
0 new messages