我在ubuntu 12.04上安装了罗盘,如下所示:
sudo gem install compass
sudo gem install sass
但是在运行此命令后:
compass version
我收到此错误:
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in
require': cannot load such file -- sass/script/node (LoadError) from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in
救援需要' 来自/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:inrequire' from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in
' 来自/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in
require' 来自/usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:inblock in <top (required)>' from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in
each' 来自/usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in<top (required)>' from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in
require' 来自/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in
' 来自/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in
require' 来自/usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:5:inblock in <top (required)>' from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:4:in
每个' 来自/usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:4:in<top (required)>' from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in
require' 来自/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:20:in
阻止' 来自/usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:8:infallback_load_path' from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:19:in
' 来自/ usr / bin / compass:23:load' from /usr/bin/compass:23:in
'
当我运行时:
ruby -v
我明白了:
ruby 1.9.3p0(2011-10-30修订版33570)[x86_64-linux]
这里需要解决的问题。
如下所述:
gem uninstall compass
gem uninstall sass
gem install compass
gem uninstall sass
gem install sass
那就是为我修好了。
答案 0 :(得分:9)
卸载sass并使用以下命令重新安装:
gem uninstall sass
gem install sass
出于某种原因
gem install compass
带来了一些尖端版本的sass,这是小马。