gpt4 book ai didi

compass-sass - compass-rails 是否支持 Ruby on Rails 4.0?

转载 作者:行者123 更新时间:2023-12-03 09:18:38 25 4
gpt4 key购买 nike

我使用 Gemfile 清理了新的 Rails 4 应用程序:

#default gems
gem 'compass-rails'
gem 'zurb-foundation'
gem 'thin'

使用 style.scss:
@import "compass";
@import "foundation/variables";
$red: rgb(255,0,1);
$green: rgb(51,153,50);
$body-bg: #F4F4F4;
$body-font-color: #7B7B7B;
$primary-color: #999;
$secondary-color: #0CC;
$dark-color: #393939;
$block-container-border-color: rgb(218,218,218);
$block-container-shadow-color: rgb(208,208,208);
// main background
html{
background:image-url('bckg.jpg');
}
body{
width:1000px;
margin:0 auto;
@include box-shadow(0px 0px 32px -5px #000);
}

我有这个错误:
Showing /Users/quatermain/Projects/rails40/app/views/layouts/application.html.erb where line #18 raised:

File to import not found or unreadable: compass.
Load paths:
/Users/quatermain/Projects/rails40/app/assets/images
/Users/quatermain/Projects/rails40/app/assets/javascripts
/Users/quatermain/Projects/rails40/app/assets/stylesheets
/Users/quatermain/Projects/rails40/vendor/assets/javascripts
/Users/quatermain/Projects/rails40/vendor/assets/stylesheets
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/turbolinks-1.2.0/lib/assets/javascripts
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/jquery-rails-3.0.1/vendor/assets/javascripts
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/coffee-rails-4.0.0/lib/assets/javascripts
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/zurb-foundation-4.2.3/scss
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/zurb-foundation-4.2.3/js
(in /Users/quatermain/Projects/rails40/app/assets/stylesheets/style.scss:5)
compass-rails 当前不支持 Rails 4 ?

最佳答案

为了支持 Rails 4,Compass 需要重写一些关键部分。 您可以使用一个临时分支,将一些支持整合在一起:
'gem "compass-rails", github: "milgner/compass-rails", ref: "1749c06f15dc4b058427e7969810457213647fb8"
您可以关注 https://github.com/Compass/compass-rails/pull/59以获取最新更新。

更新:

现在有一个 alpha 版本。
gem "compass-rails", "~> 2.0.alpha.0"
更新 2:
compass-rails 不再处于 alpha 阶段。

将以下内容添加到您的 Gemfile 并输入 bundle install .

gem "compass-rails", "~> 1.1.2"

关于compass-sass - compass-rails 是否支持 Ruby on Rails 4.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17341042/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com