ruby – 用指南针安装bootstrap sass

前端之家收集整理的这篇文章主要介绍了ruby – 用指南针安装bootstrap sass前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试安装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的问题是指南针仍然试图加载新的,这就是你需要干净的原因(或者如果它更适合你你可以做一个宝石卸载).

原文链接:https://www.f2er.com/ruby/265480.html

猜你在找的Ruby相关文章