PHPStorm: Missing file for SCSS configuration? - ruby

I'm trying to switch over to PHPStorm and I would like to activate the transpiling of SCSS files, but it seems like one file is missing in my ruby-folder.
I found an image in this thread, which shows how to configure the file watcher:
The problem is now that I don't have a "scss.bat" in my /bin/-folder, to insert in the "Program:"-field. I made sure that I have the latest version of ruby by downloading it from rubyinstaller.org.
These ".bat"-files are in my folder:
erb
gem
irb
rake
rdoc
ri
setrbvars
testrb
I tried every file, but I get a different error each time.
What am I doing wrong?
Thanks for your help.

I found my error:
I forgot to install SCSS after my Ruby-installation. To do so open your commandline and type:
gem install scss

Related

grunt compass Error: invalid option --sourcemap

i run grunt dev and get the error:
Running "compass:dev" (compass) task
Error: invalid option: --sourcemap
Don´t know why :(
Don´t even know how i could run compass without the option ... found nothing in the gruntfile.
thanks for help, i´m new with grunt/compass/sass
Execute "gem list" so we can have more details on what gem versions you're using.
AFAIK the sourcemap works since sass 3.3 and up.
If you want to disable the sourcemap on your project, check your config.rb file and check the sass_options entry, you might find ":sourcemap => true". If you find it, remove it and check it out.
Hope it helps!
This happens because of old version of SASS (or COMPASS, if you are using it) ruby gems which do not support sourcemap options.
Update these with following commands:
gem update sass
gem update compass <= if applicable
This should resolve the issue.

Trying to get Sass and Bundler to work cross team?

I created a project that is working and compiling sass as expected. My setup is just using sass, compass, & susy with Netbeans. I had another team member pull it from source control and he is unable to compile with the error:
Syntax error: File to import not found or unreadable: susy.
Load paths:
C:/wamp/www/77864nl2014/wp-content/themes/nl (DEPRECATED)
C:/wamp/www/77864nl2014/wp-content/themes/nl/sass
C:/Program Files (x86)/Prepros/gems/gems/bourbon-3.1.8/app/assets/stylesheets
C:/Program Files (x86)/Prepros/gems/gems/neat-1.4.0/app/assets/stylesheets
C:/wamp/www/77864nl2014/wp-content/themes/nl/sass
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-core-1.0.0.alpha.19/stylesheets
Compass::SpriteImporter
on line 2 of C:\wamp\www\77864nl2014\wp-content\themes\nl\sass\main.scss
Use --trace for backtrace.
He is using prepros and has a watch setup on the projects sass directory. He says that prepros is setup with the compass option and configured to use ruby. He has also already installed bundler.
The project config.rb looks like this:
http_path = '/'
css_dir = '/wp-content/themes/nl/styles'
sass_dir = '/wp-content/themes/nl/sass'
images_dir = '/wp-content/themes/nl/images'
javascripts_dir = '/wp-content/themes/nl/scripts'
require 'bundler/setup'
require 'susy'
The Gemfile looks like:
source 'https://rubygems.org'
gem 'sass', '3.3.4'
gem 'compass','1.0.0.alpha.19'
gem 'susy','1.0.9'
I'm not sure what's going on exactly but have several things to try, but hope asking here could expedite the process. We have numerous developers in my office using PCs and Macs, with various IDEs and I was hoping bundler could help solve some issues we have been having. I want to be able to set the specific gems and versions used for a project and commit that with the rest of the project in source control. If another developer needs to work on that project I was hoping bundler would use or pull down the proper gems for the project and the developer would be off and running without having to update configs, gems, etc. Is this how bundler can work once we figure this out? If not is there another better solution for our situation and goals?
The key was to prepend your "compass watch" with "bundle exec". So in command prompt, start your watch using "bundle exec compass watch" on the project directory.

Use Bourbon SASS library with LiveReload

I'd love to use Bourbon with LiveReload but I can't seem to get them to work together. Anybody successfully made these two play nice?
If you use the 'Run a custom command after processing changes' option rather than the standard compilation option, then you can use the commands as detailed on the readme.
# Example (project root directory)
sass --watch stylesheets/sass:stylesheets -r ./stylesheets/sass/bourbon/lib/bourbon.rb
I wrote a blog post covering this.
If you install the latest version (3.0.0) of Bourbon and install bourbon into your compass sass directory:
bourbon install --path ./sass
You can then use LiveReload with one small tweak. You will need to replace LiveReload's version of SASS with at least 3.2.3, since Bourbon requires this.
Instructions on how to replace LiveReload's default SASS version can be found here: http://carl-topham.com/theblog/post/changing-version-sass-livereload/
This seems to work for me.
I've been told you can get it to work by passing the lib/bourbon.rb file into the "Run a custom command" option in LiveReload. See attached image.

oocss-compass plugin setup

I'm having trouble in the setup of oocss-compass plugin.
The steps I did:
Downloaded the oocss-compass and placed it on my desktop (https://github.com/he8us/oocss-compass)
Inside the oocss-compass destkop folder I runed:
rvm use #global
gem build oocss-compass.gemspec
gem install oocss-compass-[GEMVERSION].gem
The gem is on my gem list (oocss-compass)
Then on my working folder (not RoR project, just empty folders and html static pages), I runed:
compass create css -r oocss-compass --using oocss-compass
And it returns me an error:
Errno::ENOENT on line ["95"] of /Users/username/.rvm/gems/ruby-1.9.2-p290#global/gems/compass-0.11.7/lib/compass/installers/base.rb: No such file or directory - /Users/username/.rvm/gems/ruby-1.9.2-p290#global/gems/oocss-compass-0.0.1/lib/../templates/project/partials/_base.sass
What can be missing or what i did wrong on the installation?
I've just submitted the modifications to GitHub and published a gem on Rubygems.org ;)
You can update the gem and start building...
Have a nice day,
He8us
I'm the owner of the repository.
I've just did the test and I have the same problem. It's probably because Compass changed the way to create the plugins. I will look at it and come back to you asap.

Using blueprint.sass in Webby/Compass Integration

I'm following an article here:
http://gom-jabbar.org/articles/2009/02/04/don-t-use-css-or-table-layout-use-sass-ad-compass
more specifically the section entitled "Concrete Example of using
Compass and Sass for creating a layout that people generally use
tables for"
The example references #import blueprint.sass
Where is this file located as my webby project does not seem to be able to find it.
(Also note that I'm using Ubuntu)
My layout.sass file looks like this (nothing fancy):
---
filter: sass
extension: css
layout: nil
---
#import blueprint.sass
body
+blueprint-typography
I get the following error when running webby:
create output/stylesheets/layout.css
[22:56:30] ERROR: while rendering page 'content/stylesheets/layout.sass'
[22:56:30] ERROR: sass filter error: "File to import not found or unreadable: blueprint.sass."
Definitely need to upgrade to the latest edge haml. That was a bug in how comments get parsed that was fixed in the last month or so.
git checkout git://github.com/nex3/haml.git
cd haml
rake install
Alright figured it out...
You have to download/install the most recent installation of haml which isn't yet specified on the compass primer
This should actually be the first step in installing it!
And here is how that step goes:
Download the latest version of HAML with the following command: git clone git://github.com/nex3/haml.git
(This will create a new directory ./haml/)
Change to the ./haml/ directory.
In the ./haml/ directory type the following command: rake install

Resources