[SassBeautify] [Errno 2] No such file or directory: "sass-convert"

螢幕快照 2017-01-11 上午11.58.57.png

Have you ever meet this problem ?

Also use rvm and follow Official website steps, couldn’t implement?
problem.png

Don’t worry!Follow the steps below:

1.Open up terminal

2.conmmand: echo $PATH(是顯示隨時call得到的各種全域路徑)

1
/Users/username/.rvm/gems/ruby-2.3.2/bin /Users/username/.rvm/gems/ruby-2.3.2@global/bin /Users/username/.rvm/rubies/ruby-2.3.2/bin /Users/username/.nvm/v0.11.16/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Users/username/.rvm/bin /Users/username/.rvm/bin

3.[Warning] Don’t copy the entire PATH into the ‘path’ setting, Just Find your $PATH like this one

1
/Users/username/.rvm/rubies/ruby-2.3.2/bin

4.Going to Sublime open this Preferences >> Package Settings >> SassBeautify >> Settings - User
Setting example:

螢幕快照 2017-01-11 上午11.30.04.png

Maybe you also display this message?

[Errno 2] No such file or directory: ‘sass-convert’

1.Open up terminal

2.conmmand: sudo gem install sass

3.open your sublime3 to key ctrl + shift + P,choose SassBeautify

4.Successful : you can find status,open your console (key ctrl + ~)
enter this message :sublime.log_commands(True)
螢幕快照 2017-01-11 上午11.58.57.png

讓我來解析一下

在執行 SassBeautify,你必須要有 sass-convert
而 sass-convert 是在下載Sass時一併載入
而 Sass 是一隻 Gem,無庸置疑
那當然要使用 ruby 環境去執行
而 Sassbeautify,在未使用RVM時
只會吃一個 ruby 版本,且一個 Gem,且同一個路徑下

但使用RVM時
會產生rubies資料夾、gems資料夾

1
2
3
4
5
$ which ruby
$ /Users/jimmy/.rvm/rubies/ruby-2.3.2/bin/ruby

$ which sass
$ /Users/jimmy/.rvm/gems/ruby-2.3.2/bin/sass

頓時發現是不同路徑的!(原因自己去問rvm開發者的邏輯XD)

不過你可以試看看做下面的測試
以下兩都沒有安裝Sass

rubies資料夾

1
2
$ cd /Users/jimmy/.rvm/rubies/ruby-2.3.2/bin/
$ ls

螢幕快照 2017-01-13 下午5.23.15.png

要在這個路徑下安裝 Sass,指令 sudo gem install sass
讓 SassBeautify 使用 ruby 執行 sass-convert

gems資料夾

1
2
$ cd /Users/jimmy/.rvm/gems/ruby-2.3.2/bin/
$ ls

螢幕快照 2017-01-13 下午5.23.43.png

有發現這個路徑下沒有 ruby 這個資料夾嗎?
所以你用這個路徑執行 SassBeautify,會[Warning]顯示
ruby: No such file or directory
而一般我們下這個指令gem install sass,則會安裝的在這個路徑上

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×