7

I wanted to use SASS on our company's web app but I can't install any programs on production machines. Everything I searched about SASS required you to run an installation program like gem and also required HAML.

I was hoping to find just a script that processes scss files without needing to install anything else.

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
Ruan Mendes
  • 90,375
  • 31
  • 153
  • 217

6 Answers6

4

Well... if you have Ruby available, you could checkout the Git repository of Sass (https://github.com/nex3/sass). Do so by either typing git clone https://github.com/nex3/sass.git or just downloading it.

Then you could use the interactive Ruby console by typing irb. Try to require 'sass/lib/sass' (this one here) and run Sass.compile_file 'my_styles.css'.

Otherwise... why are you trying to do that? You can also install sass locally, run sass --watch on your sass folder and it compiles your scss files automatically into css files - which you can deploy on your production environment.

crispy
  • 5,737
  • 4
  • 33
  • 45
  • Running sass --watch works well if you're a single developer and you copy files to production by hand. For a multiple developer project, I 'd rather just do the compilation and the copying to deploy location through our build system. I just want to know how to run `ruby sass file.scss > file.css` – Ruan Mendes Nov 29 '10 at 16:35
3

If you can run java program in your build system, you could use JRuby for compiling sass. See this answer for more details

Community
  • 1
  • 1
Joep
  • 4,003
  • 3
  • 28
  • 32
  • This is more like along the lines of what I'm looking for, though I'd rather not need to install JRuby. – Ruan Mendes Dec 15 '10 at 17:16
  • 1
    You don't need to install it. If you have a jvm on the build system you can run ant and jruby, without installing anything. The example uses only the java archive of JRuby to run a small ruby script that calls haml/scss. – Joep Dec 15 '10 at 18:01
2

Here's a solution for using Sass without using the command line or installing dependencies. It works with Windows, OS X, and Linux. It has a graphical interface, and no installer, just unzip and double-click.

Jaredcheeda
  • 1,657
  • 17
  • 15
zgchurch
  • 2,302
  • 1
  • 14
  • 7
1

You can also use the java library https://github.com/scireum/server-sass which can be embedded into any java based web-app. It will compile sass on the fly and return the resulting css. This is especially useful if the Sass sources change (i.e. for customizing reasons) and an ahead of time compilation is not possible. (Note: I'm the author of the project - and it is also not yet a complete implementation of the Sass standard).

Andreas Haufler
  • 401
  • 4
  • 9
0

Alternatively, what you could do is:

  1. Install Ruby
  2. Download the Sass Gem
  3. Navigate to download location
  4. Run: gem install sass-3.3.4.gem
  5. Voila! Sass is installed.
askrich
  • 598
  • 5
  • 20
  • Sorry, had to downvote this. The question is about running sass without installing it. – Ruan Mendes Apr 09 '14 at 22:17
  • Sorry - must have mis-read the question.. Only reason I posted this was because I was having a similar issue, which I then managed to resolve. Read the question has "Without Installing through Package manager", as that was my issue. – askrich Apr 10 '14 at 07:26
0

Use the online Sass compiler SassMeister. You just have to paste your sass code on the left panel and get the css code on the right.

Ramon Suarez
  • 309
  • 3
  • 12