加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby – 用指南针安装bootstrap sass

发布时间:2020-12-16 22:55:51 所属栏目:百科 来源:网络整理
导读:我正在尝试安装bootstrap-sass并在下面收到错误.我已经尝试过较旧版本的sass,但是bundler一直在安装3.3.0. WARN: Unresolved specs during Gem::Specification.reset:sass (~ 3.2)WARN: Clearing out unresolved specs.Please report a bug if this causes p
我正在尝试安装bootstrap-sass并在下面收到错误.我已经尝试过较旧版本的sass,但是bundler一直在安装3.3.0.
WARN: Unresolved specs during Gem::Specification.reset:
sass (~> 3.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in require': cannot load such file -- sass/script/node (LoadError)
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in require'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:inblock in '
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in each'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in require'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass.rb:5:in require'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass.rb:5:inblock in '
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass.rb:4:in each'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/lib/compass.rb:4:in'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/bin/compass:20:in require'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/bin/compass:20:inblock in '
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/bin/compass:8:in fallback_load_path'
from /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/bin/compass:19:in'
from /usr/bin/compass:23:in load'
from /usr/bin/compass:23:in'

我的Ruby版本 –
ruby 2.0.0p247(2013-06-27修订版41674)[universal.x86_64-darwin13]

我的Gemfile

source "https://rubygems.org"

gemspec

platform :rbx do
  gem 'rubysl','~> 2.0'
  gem 'json','>= 1.8.1'
  gem 'rubysl-test-unit','~> 2.0'
  gem 'racc'
end

我的Gemspec

lib = File.expand_path('../lib',__FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'bootstrap-sass/version'

Gem::Specification.new do |s|
  s.name     = "bootstrap-sass"
  s.version  = Bootstrap::VERSION
  s.authors  = ["Thomas McDonald"]
  s.email    = 'tom@conceptcoding.co.uk'
  s.summary  = "Twitter's Bootstrap,converted to Sass and ready to drop into Rails or Compass"
  s.homepage = "https://github.com/twbs/bootstrap-sass"
  s.license  = 'MIT'

  s.add_development_dependency 'compass'
  s.add_development_dependency 'term-ansicolor'
  s.add_development_dependency 'sass-rails','>= 3.2'
  s.add_runtime_dependency 'sass','~> 3.3.0'

  s.add_development_dependency 'capybara'
  s.add_development_dependency 'poltergeist'
  s.add_development_dependency 'tzinfo'
  s.add_development_dependency 'jquery-rails'
  s.add_development_dependency 'slim-rails'
  s.add_development_dependency 'uglifier'

  s.files      = `git ls-files`.split("n")
  s.test_files = `git ls-files -- test/*`.split("n")
end

解决方法

如果您确实已签出bootstrap-sass代码,请在.gemspec中更改此行:
s.add_runtime_dependency 'sass','~> 3.3.0'

s.add_runtime_dependency 'sass','~> 3.2.0'

在此之后,运行bundle update sass,然后捆绑clean –force.降级sass gem的问题是指南针仍然试图加载新的,这就是你需要干净的原因(或者如果它更适合你你可以做一个宝石卸载).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读