How to set up Compass to get rid of inspection errors?
I am running PhpStorm 8 on Mac 10.10, and compass is not recognizing mixins.
Details:
File Watchers:
https://cloudup.com/cPQTGrhdM9B
https://cloudup.com/c3X83l_6zov
Compass:
https://cloudup.com/ctoQdbZQ5Ii
Gem Env:
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.7
- RUBY VERSION: 1.9.3 (2014-11-13 patchlevel 551) [x86_64-darwin14.3.0]
- INSTALLATION DIRECTORY: /Users/Ambi/.rvm/gems/ruby-1.9.3-p551@omega.uclalib_omega
- RUBY EXECUTABLE: /Users/Ambi/.rvm/rubies/ruby-1.9.3-p551/bin/ruby
- EXECUTABLE DIRECTORY: /Users/Ambi/.rvm/gems/ruby-1.9.3-p551@omega.uclalib_omega/bin
- SPEC CACHE DIRECTORY: /Users/Ambi/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/Ambi/.rvm/rubies/ruby-1.9.3-p551/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-14
- GEM PATHS:
- /Users/Ambi/.rvm/gems/ruby-1.9.3-p551@omega.uclalib_omega
- /Users/Ambi/.rvm/gems/ruby-1.9.3-p551@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- SHELL PATH:
- /Users/Ambi/.rvm/gems/ruby-1.9.3-p551@omega.uclalib_omega/bin
- /Users/Ambi/.rvm/gems/ruby-1.9.3-p551@global/bin
- /Users/Ambi/.rvm/rubies/ruby-1.9.3-p551/bin
- /Users/Ambi/.rvm/bin
- /opt/local/bin
- /opt/local/sbin
- /usr/local/bin
- /usr/lib/php/pear
- /Applications/MAMP/Library/bin
- /Applications/MAMP/bin/php5.6.7/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/git/bin
Error Message:
/usr/bin/compass compile /Applications/MAMP/htdocs/UCLALIB/www/sites/all/themes/uclalib_omega /Applications/MAMP/htdocs/UCLALIB/www/sites/all/themes/uclalib_omega/sass/layouts/homepage/homepage.layout.scss
/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'compass' (>= 0) among 27 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/Ambi/.rvm/gems/ruby-1.9.3-p551:/Users/Ambi/.rvm/gems/ruby-1.9.3-p551@global', execute `gem env` for more information
from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:324:in `to_spec'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /usr/bin/compass:22:in `<main>'
Process finished with exit code 1
More:
https://cloudup.com/cHeFMTh1zny
Does anyone know how to get this working? I am using Omega 4 theme and Drupal 7
Thanks!
Please sign in to leave a comment.
Does the same command work from system terminal?
see also http://stackoverflow.com/questions/21866380/rvm-sass-compass-issue-with-localhost-sites
Yes, I saw that link and it didn't work. I think I have scoured the web pretty well for all answers and nothing worked. It does in Terminal and it works in PhpStorm too, I just want to get rid of inspection errors so autocomplete works and all those fancy features that PhpStorm *claims* to have for compass integration.
not sure I follow you.. Where do you see this error then? Seems it's thrown by a file watcher, is it? What do you mean saying that it works then? Also, I'm not sure what your unresolved import has to do with this error... Are compass imports
work? Do you have these errors shown for all your imports, or for certain ones only?
I *think* the file watchers paths are the problem. I don't know to correctly set up the paths (they were automatically setup by PhpStorm and are not working).
See this image:
https://cloudup.com/cHeFMTh1zny
https://cloudup.com/cCjMFKE4EWo
And how do I activate Configure Compass?:
https://cloudup.com/czFlCHgKnW3
I get it for all imports and mixins:
https://cloudup.com/cqlPdJlkHBR
Sass is compiling I just want Php Storm to be able to communicate with Compass for the framework mixins to work.
Thanks for helping me!
File watchers are only used for compiling files... They are not used for imports resolving - these are the settings in Preferences/Languages & Frameworks/Compass that are used for resolving compass imports in editor
Hit Alt+Enter on import statement
this most likely happens bacuse imports can't be resolved
can you run compass in your system terminal?
what compass executable do you use when running compass in terminal? /usr/bin/compass? What about specifying this executable as 'Compass executable file' in Compass preferences in PHPStorm?
Compass executable in PhpStorm is:
When I run compass watch from Php Storm (in project file):
When I run compass watch in Terminal from the project file:
ok. Please run 'which compass' in system terminal - what is the result?
No one home? What happened?
Did you try choosing this executable (/Users/Ambi/.rvm/gems/ruby-1.9.3-p551@omega.uclalib_omega/bin/compass) as compass exec in PHPStorm?