Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error using PHPStorm's SASS File Watcher

I'm getting the following error whenever PHPStorm attempts to convert my SASS file to CSS using the file watchers:

/Users/Ken/.rvm/gems/ruby-2.0.0-p195/bin/sass --no-cache --update style.sass:style.css
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem sass (>= 0) (Gem::LoadError)
  from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
  from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
  from /Users/Ken/.rvm/gems/ruby-2.0.0-p195/bin/sass:22
  from /Users/Ken/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14

When I run the command in the terminal, everything works as expected:

/Users/Ken/.rvm/gems/ruby-2.0.0-p195/bin/sass --no-cache --update style.sass:style.css

Output:

overwrite style.css

I'm confused as to why it's complaining about Ruby 1.8 version missing SASS as I've edited my settings in PHPStorm to use Ruby 2.0 (via RVM). Here are my project settings:

enter image description here

Any ideas?

like image 870
Ken Avatar asked Jun 16 '26 05:06

Ken


1 Answers

You have different PATH environment in Terminal and in PhpStorm, it's Mac OS specific.

Workarounds:

  • Run the IDE from Terminal: open -a /Applications/PhpStorm.app/
  • Edit Environment Variables directly in the File Watcher configuration.
like image 94
CrazyCoder Avatar answered Jun 17 '26 22:06

CrazyCoder