In your web adventures you may come across the following problem:
Compass was unable to compile one or more files in the project:
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.rc.0/lib/compass/commands.rb:14:in `<top (required)>': undefined method `discover_extensions!' for Compass:Module (NoMethodError)
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.rc.0/lib/compass/exec.rb:7:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Applications/CodeKit 2.app/Contents/Resources/engines/compass/compass/bin/compass:43:in `block in <main>'
from /Applications/CodeKit 2.app/Contents/Resources/engines/compass/compass/bin/compass:30:in `fallback_load_path'
from /Applications/CodeKit 2.app/Contents/Resources/engines/compass/compass/bin/compass:41:in `<main>':
Sounds like a mess doesn’t it? Fortunately, you can resolve this rather quickly as its an internal compiler error.
- Go to Codekit’s Preferences and select other tools.
- Select “Use the compass executable at this path” option and click choose.
- Go to Libary/Ruby/Gems/2.0.0/compass-1.x.x/bin/compass and select the execuatable file.*
* Note: you may need to install a newer/different version of compass. I’m currently using the pre-release alpha 21 since I need it for susy grids. You’ll need to fire up your terminal and run the following command (it’ll prompt you for your password)
sudo gem install compass -v 1.0.0.alpha.21 --pre
(You will want to check the latest version of Compass before running the above command, you may also need to install Sass first.).