我尝试运行compass
任务:
» grunt compass:dist
Running "compass:dist" (compass) task
rbenv: compass: command not found
The `compass' command exists in these Ruby versions:
1.9.3-p448
Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass Use --force to continue.
Aborted due to warnings.
指的是:
» rbenv versions
system
1.9.3-p448
* 2.1.0 (set by ..../app/.ruby-version)
但谁关心红宝石装置呢?我compass
在本地安装了app/node_modules
模块:
» npm list | head
app-settings@0.0.0 .../app
├── compass@0.1.0
├── ember-template-compiler@1.6.1
├─┬ grunt@0.4.2
│ ├── async@0.1.22
│ ├── coffee-script@1.3.3
我有几个问题:
node_modules
获取模块?node_modules
中告诉咕噜罗盘模块确实已安装?答案 0 :(得分:4)
令全球ruby
和gems
与本地的rbenv local 2.1.0 # DO THIS FIRST: select the ruby version to use
gem install compass # install the gems with the selected ruby version
rbenv rehash # recompute all shims for ruby / gems
和rbenv versions
ruby --version
compass --version
which ruby
which compass
混淆。正确的方法是:
{{1}}
现在你可以验证:
{{1}}