我从 sass-bootswatch.theblacksmithhq.com 下载了 SpaceLab 主题,并下载了它的部分文件
// FORMS
// -----------------------------------------------------
.control-group.warning {
@include formFieldState(#E29235, #E29235, $warningBackground);
}
.control-group.error {
@include formFieldState(#C00, #C00, $errorBackground);
}
.control-group.success {
@include formFieldState(#2BA949, #2BA949, $successBackground);
}
// DROPDOWNS
// -----------------------------------------------------
当我运行rake assets:precompile
或只是建立一个 Rails 服务器时,我收到此错误Undefined mixin 'formFieldState'.
这是在我添加活动管理员之后开始的。顺便说一下,我的 application.css 文件看起来像这样。
*= require_self
*= require variables
*= require base
*= require devise
*= require nav
*/
我可以从变量文件中删除该部分,它会运行,但我的样式看起来非常糟糕,几乎就像引导程序没有运行一样。
我的Gemfile
样子是这样的:
gem 'rails', '3.2.13'
gem 'devise'
gem 'omniauth-google-oauth2'
gem 'decent_exposure'
gem 'turbolinks'
gem 'simple_form'
gem 'activeadmin'
gem "meta_search", '>= 1.1.0.pre'
gem 'jquery-rails'
#TODO needed for the server
gem 'mysql'
group :production do
# needed for heroku
#gem 'pg'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'sass-rails'
gem 'bootstrap-sass'
#TODO needed for the server
#gem 'execjs'
#gem 'therubyracer'
end
group :development, :test do
gem 'certified'
gem 'better_errors'
gem 'factory_girl_rails'
gem 'pry-rails'
gem 'pry-stack_explorer'
gem 'pry-debugger'
gem 'awesome_print'
gem 'quiet_assets'
gem 'rspec-rails'
gem 'heroku'
end
group :test do
gem 'sqlite3'
end
如果还有什么可以帮助您理解的,请告诉我。