0

我想我会尝试使用 SASS,但即使安装它也遇到了问题(在 Bluehost 共享主机上,它不完全是 Ritz)。

这是我检查它是否安装的结果:

username [~/public_html/sites/all/themes]# sass -v
Sass 3.2.7 (Media Mark)
username [~/public_html/sites/all/themes]# compass -v
Unable to load Sass. Please install it with one of the following commands:
gem install sass --pre
/usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- sass (LoadError)
from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/../lib/compass/dependencies.rb:6
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/../lib/compass.rb:5:in `require'
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/../lib/compass.rb:5
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/../lib/compass.rb:4:in `each'
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/../lib/compass.rb:4
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/compass:20:in `require'
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/compass:20
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from /home7/username/ruby/gems/gems/compass-0.12.2/bin/compass:19

我尝试卸载,以不同的顺序重新安装,按照错误消息中的建议使用 --pre 标志安装 Sass,自行安装 compass 并让 sass 由 compass 安装,结果相同。

我还没有使用这些工具,所以我不知道会发生什么,但我确实必须更新我的 $PATH 才能让“sass”之类的命令正常工作,所以我怀疑 compass 无法找到 sass 或某物。发帖希望这对于有经验的人来说是一个明智的选择。

4

1 回答 1

0

参考https://my.bluehost.com/cgi/help/365并添加:

export GEM_HOME=$HOME/ruby/gems
export GEM_PATH=$GEM_HOME:/usr/lib/ruby/gems/1.8
export GEM_CACHE=$GEM_HOME/cache
export PATH=$PATH:$HOME/ruby/gems/bin

我的 .bashrc 为我解决了这个确切的错误。

于 2013-09-13T18:08:29.387 回答