问题
I'm working on someone else's project that was built in wordpress and foundation with compass. I only need to change one line of css, but Codekit keeps throwing up "unable to compile files" messages whenever I save the .scss file.
I know that this is a result of the require statement in the project's config.rb file and that codekit doesn't play well with rvm. The solution should be to change codekit's advanced compiler settings to the compass gem I've installed via the command line in my system files (/usr/bin/compass). The problem is that when I do this it just throws up a "Failed to switch compiler" message.
I'm a noob with ruby, gems, rvm and command line stuff so I can't tell if I'm missing something painfully obvious or not here. Any insight would be greatly appreciated, I'm lost!
回答1:
I assume you use rvm as you tagged your question with it, so what you need to do is:
make sure rvm is up to date:
rvm get stable
make sure ruby is selected (and installed):
rvm use ruby --install
make sure the gem is installed:
gem install compass
now print the path to
compass
wrapper:ls $GEM_HOME/wrappers/compass
Use this path to setup your compass.
Make sure to read messages on all the outputs, they are important, if there are errors or warnings make sure they are resolved before you continue.
来源:https://stackoverflow.com/questions/20999199/codekit-external-compass-compiler-path