我在我的Windows系統上安裝了Ruby以使用Sass
,以便遵循我的PHP項目中的CSS Theming中的最佳實踐,如Best Practices - CSS Theming中給出的。我以前從未使用Ruby或Sass。Errno :: ENOENT:Sass Watch命令上沒有這樣的文件或目錄
安裝完畢後,我去Start Command Prompt with Ruby
,進入 -
gem install sass
,併成功安裝。
然後按照http://sass-lang.com/tutorial.html給出的教程,
我創建了兩個文件test.scss
和test.css
在/some/path
這是我的網頁目錄(PHP開發環境)內。我寫在test.scss
以下 -
/* test.scss */
#navbar {
width: 80%;
height: 23px;
}
我在Ruby命令提示符cd'ed到/some/path
和進入 -
sass --watch test.scss:test.css
而得到這個輸出 -
Sass is watching for changes. Press Ctrl-C to stop.
Errno::ENOENT: No such file or directory - test.scss
Use --trace for backtrace
的錯誤即使我給出的CSS文件的整個絕對路徑。如果我添加--trace的命令,以下爲輸出 -
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/plugin/compiler.rb:317:i
n `read': No such file or directory - C:\xampp\htdocs\examvillage_recovered\bran
ches\I18N\trunk\style\dev_styles\test.scss (Errno::ENOENT)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/plugin/comp
iler.rb:317:in `update_stylesheet'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/plugin/comp
iler.rb:169:in `block in update_stylesheets'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/plugin/comp
iler.rb:167:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/plugin/comp
iler.rb:167:in `update_stylesheets'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/plugin/comp
iler.rb:214:in `watch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/plugin.rb:1
11:in `method_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/exec.rb:408
:in `watch_or_update'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/exec.rb:294
:in `process_result'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/exec.rb:41:
in `parse'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/lib/sass/exec.rb:21:
in `parse!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.1/bin/sass:8:in `<top
(required)>'
from C:/Ruby192/bin/sass:19:in `load'
from C:/Ruby192/bin/sass:19:in `<main>'
然後通過這個YouTube視頻http://www.youtube.com/watch?v=b_-HLevIJbc在安裝步驟提去。我也安裝了gem haml
,並且安裝成功。
但我仍然得到這個錯誤有一個額外的通知
NOTE: Gem::Specification#default_executable= is deprecated with no replacement.
It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from C:/Ruby192/lib/ruby/gems/1.9
1/specifications/rubygems-update-1.8.0.gemspec:11.
>>> Sass is watching for changes. Press Ctrl-C to stop.
Errno::ENOENT: No such file or directory - C:\xampp\htdocs\examvillage_recovere
\branches\I18N\trunk\style\dev_styles\test.scss
Use --trace for backtrace.
我該如何解決這個問題?任何指針?
謝謝