Bundler (gem 'bootstrap', '~> 4.0.0.alpha6')를 사용하여 부트 스트랩 4를 설치했고 bundle exec compass create SProject1 -r bootstrap --using bootstrap
을 실행하여 컴퍼스로 새 프로젝트를 만들었습니다. 내가 가지고 :부트 스트랩 4 _bootstrap-variables.scss 파일이 컴파일 중입니다
directory SProject1/
directory SProject1/javascripts/
directory SProject1/javascripts/bootstrap/
directory SProject1/sass/
directory SProject1/stylesheets/
create SProject1/config.rb
create SProject1/sass/styles.scss
create SProject1/sass/_bootstrap-variables.scss
create SProject1/javascripts/bootstrap/alert.js
create SProject1/javascripts/bootstrap/button.js
create SProject1/javascripts/bootstrap/carousel.js
create SProject1/javascripts/bootstrap/collapse.js
create SProject1/javascripts/bootstrap/dropdown.js
create SProject1/javascripts/bootstrap/modal.js
create SProject1/javascripts/bootstrap/popover.js
create SProject1/javascripts/bootstrap/scrollspy.js
create SProject1/javascripts/bootstrap/tab.js
create SProject1/javascripts/bootstrap/tooltip.js
create SProject1/javascripts/bootstrap/util.js
create SProject1/javascripts/bootstrap-sprockets.js
create SProject1/javascripts/bootstrap.js
create SProject1/javascripts/bootstrap.min.js
error SProject1/sass/styles.scss (Line 194 of SProject1/sass/_bootstrap-variables.scss: Undefined variable: "$grid-breakpoints".)
Compilation failed in 1 files.
나는 (분명히) 같은 오류 얻을 컴파일하려고하는 경우 :
require 'bootstrap'
require 'compass/import-once/activate'
# Require any additional compass plugins here.
require 'autoprefixer-rails'
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
on_stylesheet_saved do |file|
css = File.read(file)
map = file + '.map'
if File.exists? map
result = AutoprefixerRails.process(css,
from: file,
to: file,
map: { prev: File.read(map), inline: false })
File.open(file, 'w') { |io| io << result.css }
File.open(map, 'w') { |io| io << result.map }
else
File.open(file, 'w') { |io| io << AutoprefixerRails.process(css) }
end
end
012 : 여기
modified sass/styles.scss
error sass/styles.scss (Line 194 of sass/_bootstrap-variables.scss: Undefined variable: "$grid-breakpoints".)
내 config.rb입니다
필자는 문서에서와 같이 Autoprefixer를 추가했으나 파일의 나머지 부분은 그대로이며 이라는 이상한 오류로 인해 컴파일 할 수 없기 때문에 아직 수정하지 않았습니다. "$ grid -breakpoints ", 내가 _bootstrap-variables.scss는 오는 방법 그건 말은, 내가 할 무엇인지 모르겠습니다 ...
감사합니다. 웬일인지 나는이 간단한 단계를 간과했다. – Robert