phpstorm - #import "compass" cannot resolve - sass

I'm on Windows7, I've installed Compass and configured it correctly in my project folder.
I'm new to Scss and Compass but when I launch compass watch from CMD my style.scss gets automatically compiled and everything seems fine.
[ver. compass 1.0.1 // sass 3.4.3].
But when I open my style.scss from phpstorm #import "compass" comes up with an error cannot resolve import into sass/scss;
opening up phpstorm's compass support it looks like the default options are correct:
compass executable file: C:\Ruby200-64\bin\compass
config path: is pointing to local server and is correct
this is my watcher setting:
I've tried changing it but I can't get compass support to work....

Eventually the only way I found to get it working is creating a Symlink between my sass folder and
my compass executable;
I found an old answer on this that helped me...
in detail:
1.Open Cmd (as admin) and change dir to your sass folder in your project .
2.From your sass-folder create a symlink with mklink /d compass C:\Ruby200-64\lib\ruby\gems\2.0.0\gems\compass-1.0.1\bin\compass .
Now phpstorm works fine (with default filewatchers)_

Related

Compass watcher in WebStorm fails to compile my .scss files

I've been trying for some hours to make WebStorm's Compass watcher compile my .scss files, but it fails and I can't understand why.
I'm creating an empty test project with WebStorm and after that run
compass create
and get an error from the watcher about screen.scss that it can't find 'compass'
error sass/screen.scss (Line 6: File to import not found or unreadable: compass/reset.
I tried a couple of solutions which didn't work for me:
created a symlink from
C:\Ruby23\lib\ruby\gems\2.3.0\gems\compass-1.0.3\bin\compass
to my sass folder;
added the compass directory as a resource in the project
File->Settings->Directories;
re-installed compass.
The config.rb settings are the default ones:
These are my watcher's settings, I will provide other information if needed

Why isn't my SASS watch command working?

Attempting on a Mac with the latest version of Yosemite
I'm using the latest version of sass to refactor my site. I'm setting up watch command via the command line. my directory setup has a scss folder with the main css stylesheet cloned as .scss. and no css folder.
When I attempt the sass --watch scss:css command while in the main project directory folder, I've been told that, if there isn't one present, a css folder should be generated and a cloned .css file should be created along with a map file. Command line tells me >>> Sass is watching for changes. Press Ctrl-C to stop. however, changes are not being recorded.
I've tried updating my gems and uninstalling/ reinstalling sass, but nothing seems to be working.
Just tried this - the css folder doesn't get autogenerated. You need to generate it yourself. From there on, you should be good to go.
So if you are in the main project folder with subfolders called scss and css and you have, for example, a main.scss file in the scss directory, you can run the command exactly as you specified and everything should work as specified.

listener.rb: Not a directory

In the past few week, I've started seeing errors when I try to run compass watch:
Errno::ENOTDIR on line ["60"] of /Library/Ruby/Gems/2.0.0/gems/listen-2.8.0/lib/listen/listener.rb: Not a directory - /Users/nick/.compass/extensions/readme.txt/stylesheets
It will watch and compile the SCSS into CSS once and then I have to run compass watch again and get that error. When I run compass watch --trace, I get this:
https://www.dropbox.com/s/s1cia842dusitol/compass-watch-trace.png?dl=0
My versions are Compass 1.0.1 (Polaris) & Sass 3.4.9 (Selective Steve)
I had the same problem when running compass watch in terminal because I was in the wrong directory. Are you running it in the same directory as the config.rb file is located at?
I fixed it by first navigating to the folder config.rb is in and then executing compass watch...
Best option I found was this: Failed to build gem native extension (installing Compass)
After that, I starting using http://mhs.github.io/scout-app/ and that worked fine. When I started a new job that uses Grunt, I ditched compass watch all together and used the grunt-contrib-sass plug-in to get the job done.

Watch and compile existing scss folder with compass

Hi I am working on a project which already comes with an scss and css folder with existing files within them. I have compass installed and I am trying to get it to watch the scss folder and compile the changes to the css folder. If i use
compass create
it generates all of its own folders. If I use
compass create . --bare --sass-dir "scss" --css-dir "css"
it says the config.rb file already exists. And if I use
compass watch
it says there is nothing to compile. Any ideas where I am going wrong? Cheers!
You can also run Sass with the --compass flag to load Compass. This makes it easy to slot Compass into an existing Sass project.
I know this is an older question, but stumbled across it when I encountered the same issue, interestingly running the following worked for me. Without --force, I encounted the same issue as OP when he tried the command without it, but with it included, it worked like a charm.
compass create . --bare --sass-dir "scss" --css-dir "css" --force

LiveReload + Compass error- Syntax error: File to import not found or unreadable

I have windows 7 and I've installed ruby, sass, compass, and LiveReload 0.9.2. When I make an update to my .scss files everything works fine until I try to import compass. I'm receiving this error.
Syntax error: File to import not found or unreadable
I've created a project in compass and have LiveReload watching the same folder.
When I run compass from the command line to watch files it works perfectly. It seems like LiveReload isn't finding the appropriate file to import. I've tried modifying the 'config.rb' file but still received the same error.
Is this a bug with the LiveReload 0.9.2? Or am i just being a numbskull?
Have you trying updating ?
Also, there are a few stuffs you need to be sure in order to compile compass.
Have you checked -> http://feedback.livereload.com/knowledgebase/articles/86203-sass-compass ?
Please, verify the above linked and let me know in which state are you.

Resources