Not ready for Rails 4.0:
http://ready4rails4.net/gems/compass-rails
And the contributors were clear on that 9 months before Rails 4 dropped:
문제
I read that compass for rails 4 is not ready, but its work with "2.0 alpha"... I don't understand. Has anyone solved this problem it?
my Gemfile
gem 'sass-rails'
gem "compass-rails" #or gem "compass-rails", "~> 2.0.alpha.0"
my application.css.scss //no error, rails recognize the directory
@import "compass";
my error for my first mixin test
Sass::SyntaxError at /partners/dashboard
Undefined mixin 'border-radius'.
해결책
Not ready for Rails 4.0:
http://ready4rails4.net/gems/compass-rails
And the contributors were clear on that 9 months before Rails 4 dropped:
다른 팁
I have updated from Rails 3.2 to Rails 4.0 including the gem compass-rails. I have pasted in my gem file below. I updated as many gems as possible but a couple could not get very latest versions. The command "bundle outdated" gives you an idea about outdated gem Pierre
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails_12factor', group: :production
gem 'rails', '4.0.0'
gem 'pg'
gem 'thin'
# do I need this gem for form backing objects
gem 'virtus'
gem 'jbuilder', '~> 1.2'
gem 'sass-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.0.0'
gem "compass-rails", '~> 2.0.alpha.0'
gem 'uglifier', '~> 2.2.1' # java script compression
gem 'rspec-rails'
gem 'debugger'
gem 'better_errors' # railscast 402
gem 'binding_of_caller'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'bcrypt-ruby', '~> 3.0.0'
# tried this update but got errors so backed out
# gem 'bcrypt-ruby' '~>3.1.2'
# paging, searching
gem 'will_paginate', '~> 3.0'
gem 'ransack'
gem "redcarpet", '~> 3.0.0'
gem 'cancan'
gem 'simple_form'
# For drill evaluation- railscast 326
gem 'active_attr'
# For db population
gem 'seed_dump'
# longitude and latitude
gem 'geo_position'
It's not good to use @import
in a .css file. You need to rename it to application.css.scss
. But I prefer to import compass directly in the files where I need it. And Also I prefer to import only the parts I really need like compass/css3
so that I don't include anything I don't really use.
If that does not help with your problem, you might need to paste in the /partners/dashboard styles to see what's in there.