Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Configure Ruby to use compass for Sench-touch on Windows

Hi I recently started using Sencha-touch and I've come to understand that to bend the GUI to my will I must be able understand and manipulate the .SCSS files.

This means I have to use COMPASS or one of the other technologies to compile .SCSS files and I need Ruby as well to work with the config.rb file.

Can anyone please run me through the Windows OS setup and configuration of COMPASS, RUBY and the rest so I can compile files as easily as depicted on the COMPASS website http://compass-style.org

Thanks. I use Windows 7

like image 281
Shoppyonline Avatar asked Feb 27 '12 11:02

Shoppyonline


2 Answers

First you need to install Ruby if you do not have it already. Get the latest Windows installer at http://www.rubyinstaller.org.

The installer should automatically add the Ruby folder to your PATH environment variable, so you can run Ruby commands from the command line. Once Ruby is installed, open a command line interface (cmd.exe) and install the required Compass packages using the 'gem' command from Ruby. Do this with the following three commands:

gem install haml
gem install haml-edge
gem install compass

After the packages install, type compass version to see if it installed correctly. You should see something like "Compass 0.11.7 (Antares) Copyright (c) 2008-2012 Chris Eppstein..."

If the gem and compass commands do not do anything, ensure that your Ruby folder is in your path. Check this tutorial if you need help.

The specifics for your config.rb depend on how you have your system and projects set up. Most of the configuration deals with the folder structure of you project. I'll refer you to the Sencha documentation for this: - Mastering the Compass/SASS Setup with Sencha Touch - An Introduction to Theming Sencha Touch

Once your config.rb is set up, you can run compass compile in your .scss folder to build the css files.

like image 146
eterps Avatar answered Nov 13 '22 07:11

eterps


You need to install rubygems to use the gem command, you can find it here

Rubygems

And I believe you do not need to install these. It works for me without these.

gem install haml
gem install haml-edge

I just install Compass with (pre release)

gem install compass --pre
like image 38
Ronan Quillevere Avatar answered Nov 13 '22 06:11

Ronan Quillevere