PDA

View Full Version : SASS Errors in Version 1.1



markwyner
25 Mar 2011, 10:00 AM
Hello,

Yesterday DavidGillespie inquired about getting help with SASS issues and Nicodemuz reported the same error:

http://www.sencha.com/forum/showthread.php?127972-Help-with-theming!

As it turns out, his error is directly related to the 1.1 release. I can confirm this as well because after having updated from 1.0.1a to 1.1 I received an error when attempting to watch my SASS directory with Compass. My error was different, but I believe they're both related to the 1.1 release.

We collectively discovered two different errors:

1. DavidGillespie and NicoDemuz's error:


error myapp.scss (Line 24: Undefined mixin 'background-image'.)
Sass::SyntaxError on line ["24"] of u: Undefined mixin 'background-image'.

I found the referenced line 24 in /resources/themes/stylesheets/sencha-touch/default/_mixins.scss:


@include background-image(linear-gradient(color_stops(lighten($bg-color, 30%), lighten($bg-color, 7%) 2%, darken($bg-color, 7%))));

2. My error:


NoMethodError on line 9 of /Users/markwyner/Documents/Gigs/PriceBox/Site_Sencha/www/resources/sass/../themes/lib/theme_images.rb: undefined method `inline_image_string' for #<Sass::Script::Functions::EvaluationContext:0x1011f6bc8>

When I reverted to 1.0.1a and ran a watch I received no errors, so I can confirm my error is directly related to the new version. Line 9 of theme_images.rb in 1.1 reads:


inline_image_string(data(real_path), compute_mime_type(path, mime_type))

That same line in theme_images.rb in 1.0.1a reads:


url = "url('data:#{compute_mime_type(path,mime_type)};base64,#{data(real_path)}')"

Any help resolving this would be greatly appreciated.

Thanks in advance.

stormin_walker
26 Mar 2011, 2:01 PM
Sencha upgraded Compass support to 0.11. There have been a few complaints (including from me) that it wasn't made explicit in the release notes about this breaking change. So you will need to upgrade Compass to the latest beta version. To do that (in Mac - but essentially the same in Windows) do this:

$ gem install chunky_png -v 0.12.0
$ gem install compass --pre

(I tried to install the latest version of chunky_png but 0.11 Beta 3 has a dependency on that particular version).

Hope that helps,

Craig

markwyner
26 Mar 2011, 3:21 PM
Thanks, stormin_walker. This almost did the trick for me. I ran the install for v0.12.0 of chunky_png as you recommended, but then got this error when trying to watch my SASS directory:


ERROR: Error installing compass: compass requires chunky_png (~> 1.1.0, runtime)

When I installed v1.1.0 of chunky_png and began watching, everything fell into place nicely. So thanks. Maybe the Sencha Touch team should update the release notes to reflect this.

Cheers!

stormin_walker
26 Mar 2011, 6:51 PM
Funny - there have been 2 new betas of Compass in the last 24 hours. My Beta 3 requires chunky_png 0.12 - am glad they've upgraded the dependency. Good to know for when I next do an update.

Craig

leeprobert
30 Mar 2011, 2:43 AM
I can confirm that installing the chunky_png-1.1.0 gem and then re-installing compass worked. Thanks for this guys.

Bucs
3 Apr 2011, 5:28 AM
Thanks for this, worked for me as well on Windows.

Now, if only someone would write a worthy article on how best to use SASS with Touch so I would know what I am doing, rather than type and pray :D

markwyner
4 Apr 2011, 2:19 PM
@Bucs:

A few of us lassoed in some information about the variables which may help you out:

http://www.sencha.com/forum/showthread.php?127694-Is-There-a-Complete-List-of-SASS-Variables-for-the-Touch-Theme

Cheers.

matrym
13 Apr 2011, 2:17 AM
I can confirm that installing the chunky_png-1.1.0 gem and then re-installing compass worked. Thanks for this guys.

This didn't work for me:
sudo gem install chunky_png -v 1.10.0
ERROR: could not find gem chunky_png locally or in a repository

This worked for me:
sudo gem install chunky_png -v 1.1.0
sudo gem install compass --pre

lightxx
24 Aug 2011, 11:14 PM
has anyone ever got this working for ubuntu? i'm running Ruby 1.8.7 with RubyGems 1.3.7.

this is my gems list:

chunky_png (1.2.1)
compass (0.11.5)
fssm (0.2.7)
haml (3.1.2)
sass (3.2.0.alpha.11)

whenever i do a 'compass compile' i get
NoMethodError on line 9 of /home/tom/Downloads/sencha-touch-1.1.0/resources/scss/../themes/lib/theme_images.rb: undefined method `inline_image_string' for #<Sass::Script::Functions::EvaluationContext:0xb747a240>

this is really annoying. help, anyone?

bassjobsen
2 Sep 2011, 2:11 AM
[/URL]@lightxx for unbuntu this: http://groups.google.com/group/compass-users/msg/57c879bc550e0ddf (http://www.sencha.com/forum/member.php?112273-lightxx) helps for me.

It seems the old version of compass is still used after install a newer version with gem

[URL="http://www.sencha.com/forum/member.php?112273-lightxx"]

WallTearer
3 Sep 2012, 8:14 AM
Thanks for your responses.
I was installing all these different versions of chunky_png, and compass.
In the end, I ended up launching compass compile with

/var/lib/gems/1.9.1/bin/compass compile
Maybe this will help someone.