SASS won't build in Sublime Text 2 [Errno 2] No such File or Directory

感情迁移 提交于 2019-12-05 18:02:55

The reason the build command isn't working is because Sublime can't find your sass executable. If you open Terminal and type which sass at the prompt, it'll most likely give you a location along the lines of /Users/username/.rvm/gems/ruby-1.9.3-p385/bin/sass - it's location on my system. As you can see right in the output you posted, Sublime is only looking in a few directories for it, unfortunately it's not in any of the directories being searched.

There are two ways around this. The first is to modify your SASS .sublime-build file (Ruby.sublime-build has nothing to do with this) to point to the correct location of sass. The second is to run

sudo ln -s /path/to/sass /usr/local/bin/sass

at the command prompt (obviously substituting the correct path for your system) to create a symlink to sass in /usr/local/bin, which is one of the directories Sublime is searching. Either one will do fine, although if you ever update your ruby version and the sass gem, you'll need to update either the build file or the symlink.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!