[英]Ruby compass - cannot load such file — compass/core (LoadError)
I'm trying to install and work around compass gem and the commands I used while installing this are - 我正在尝试安装指南针gem,并且在安装指南针时使用的命令是-
gem install sass
gem install compass
Now I can see the version of sass with the command - 现在,我可以使用以下命令查看sass的版本-
sass --version
But when I do - 但是当我这样做时
compass --version
The messsage i get is - 我得到的消息是-
/home/name/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- compass/core (LoadError)
from /home/name/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/compass-1.0.3/lib/compass.rb:14:in `block in <top (required)>'
from /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/compass-1.0.3/lib/compass.rb:13:in `each'
from /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/compass-1.0.3/lib/compass.rb:13:in `<top (required)>'
from /home/name/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/name/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/compass-1.0.3/bin/compass:20:in `block in <top (required)>'
from /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/compass-1.0.3/bin/compass:8:in `fallback_load_path'
from /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/compass-1.0.3/bin/compass:19:in `<top (required)>'
from /home/name/.rbenv/versions/2.3.1/bin/compass:22:in `load'
from /home/name/.rbenv/versions/2.3.1/bin/compass:22:in `<main>'
I've tried searching on google and went through whole lot of github issues and stackoverflow questions regarding compass, but any of those didn't help. 我尝试在Google上进行搜索,并遇到了很多关于指南针的github问题和stackoverflow问题,但这些问题都无济于事。
How should i resolve this issue? 我应该如何解决这个问题?
Update:- I was asked to include the o/p of following command here - 更新:-我被要求在此处包括以下命令的o / p-
gem list -d | grep compass -A 4
O/p:- O / p:-
compass (1.0.3)
Authors: Chris Eppstein, Scott Davis, Eric M. Suzanne, Brandon
Mathis, Nico Hagenburger
Homepage: http://compass-style.org
Installed at: /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
A Real Stylesheet Framework
compass-core (1.0.3)
Authors: Chris Eppstein, Scott Davis, Eric M. Suzanne, Brandon
Mathis
Homepage: http://compass-style.org/reference/compass/
License: MIT
Installed at: /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
The Compass core stylesheet library
--
compass-import-once (1.0.5)
Author: Chris Eppstein
Homepage:
https://github.com/chriseppstein/compass/tree/master/import-once
License: MIT
Installed at: /home/name/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
Speed up your Sass compilation by making @import only import each
Ruby compass is no longer supported. 不再支持Ruby罗盘。 Best get off. 最好下车。 But I ran into the same issue, only one one VM, a linux machine with ruby 2.6.2p47 & gem 3.0.3, until finally I saw that gem install compass was not getting compass-core. 但是我遇到了同样的问题,只有一个虚拟机,一台装有ruby 2.6.2p47和gem 3.0.3的linux机器,直到最后我看到gem install罗盘没有得到罗盘核心。 Whereas on other versions it was getting it. 而在其他版本上,它得到了。 Solution - do it explicitly: 解决方案-明确地执行以下操作:
gem install compass-core
Anyway - it worked for me and I hope it helps other stragglers! 无论如何-它对我有用,我希望它对其他流浪者有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.