共享主机上的Sass和Compass设置

时间:2013-03-20 03:02:01

标签: environment-variables sass compass-sass

我以为我会尝试使用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,如错误消息中所建议的那样,自行安装指南针并让sass通过指南针安装,结果相同。

我还没有使用这些工具,所以我不知道应该发生什么,但我确实需要更新我的$ PATH以使“sass”这样的命令工作所以我怀疑指南针是不能够的找到sass之类的东西。希望这对有经验的人来说是明智的。

1 个答案:

答案 0 :(得分: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为我解决了这个确切的错误。