Я установил Ruby в своей системе Windows, чтобы использовать Sass
, чтобы следовать рекомендациям по CSS-тематике в моем проекте PHP, как указано в Рекомендации по CSS-тематике . Я никогда раньше не использовал Ruby или Sass.
После установки я зашёл на 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;
}
Я набрал /some/path
в командной строке Ruby и ввел -
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.
Как мне это исправить? Есть указатели?
Спасибо