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:

     - https://rubygems.org/

  - 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!

13 comments

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.

0

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

@import 'compass'


work? Do you have these errors shown for all your imports, or for certain ones only?

0

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!

0

I *think* the file watchers paths are the problem.

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

And how do I activate Configure Compass?:


Hit Alt+Enter on import statement

I get it for all imports and mixins:


this most likely happens bacuse imports can't be resolved

Sass is compiling I just want Php Storm to be able to communicate with Compass


can you run compass in your system terminal?
0

I *think* the file watchers paths are the problem.

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

Then how do I fix my Preferences?

And how do I activate Configure Compass?:


Hit Alt+Enter on import statement

I get "Failed to configure Compass" even though this was automatically set up by PhpStorm 8.

I get it for all imports and mixins:


this most likely happens bacuse imports can't be resolved


How can I fix imports can't be resolved problem then?

Sass is compiling I just want Php Storm to be able to communicate with Compass



can you run compass in your system terminal?

Yes, but I want to run it in PhpStorm for convenience. Isn't that the point?


Many thanks!!!

0

Yes, but I want to run it in PhpStorm for convenience. Isn't that the point?



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?
0

lena_spb wrote:


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:

/Users/Ambi/.rvm/gems/ruby-1.9.3-p551@omega.uclalib_omega/gems/compass-0.12.2/bin/compass


When I run compass watch from Php Storm (in project file):

8:31:24 AM Compass: Failed to run compass on '/Applications/MAMP/htdocs/UCLALIB/www/sites/all/themes/uclalib_omega/config.rb'
8:33:04 AM Compass: Failed to run compass on '/Applications/MAMP/htdocs/UCLALIB/www/sites/all/themes/uclalib_omega/config.rb'


When I run compass watch in Terminal from the project file:


pow-m-dit302:// Ambi$ cd /Applications/MAMP/htdocs/UCLALIB/www/sites/all/themes/uclalib_omega

pow-m-dit302:uclalib_omega Ambi$ compass watch

>>> Compass is watching for changes. Press Ctrl-C to Stop.

0

ok. Please run 'which compass' in system terminal - what is the result?

0

lena_spb wrote:

ok. Please run 'which compass' in system terminal - what is the result?

0

pow-m-dit302:uclalib_omega Ambi$ which compass

/Users/Ambi/.rvm/gems/ruby-1.9.3-p551@omega.uclalib_omega/bin/compass

0

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?

0

Please sign in to leave a comment.