活动管理sass编译错误

时间:2015-12-23 07:57:56

标签: ruby-on-rails ruby activeadmin

我没有在我的rails应用程序中使用Sass,在添加活动管理员后,它将sass作为依赖项添加到我的rails应用程序中。现在我运行RAILS_ENV=production rake assets:precompile --trace,它会抛出错误

rake aborted! NoMethodError: undefined method [] for nil:NilClass

我在这里附加我的Gemlock文件。这是我的active_admin.css.scss文件

@import "active_admin/mixins"; @import "active_admin/base";
GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.4)
      actionview (= 4.2.4)
      activesupport (= 4.2.4)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    activeadmin (1.0.0.pre2)
      arbre (~> 1.0, >= 1.0.2)
      bourbon
      coffee-rails
      formtastic (~> 3.1)
      formtastic_i18n
      inherited_resources (~> 1.6)
      jquery-rails
      jquery-ui-rails
      kaminari (~> 0.15)
      rails (>= 3.2, < 5.0)
      ransack (~> 1.3)
      sass-rails
    activejob (4.2.4)
      activesupport (= 4.2.4)
      globalid (>= 0.3.0)
    activemodel (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
    activerecord (4.2.4)
      activemodel (= 4.2.4)
      activesupport (= 4.2.4)
      arel (~> 6.0)
    activesupport (4.2.4)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    arbre (1.0.3)
      activesupport (>= 3.0.0)
    arel (6.0.3)
    bcrypt (3.1.10)
    bootstrap_flash_messages (1.0.2)
    bourbon (4.2.6)
      sass (~> 3.4)
      thor (~> 0.19)
    builder (3.2.2)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    clndr-rails (1.2.10.1)
      jquery-rails
      momentjs-rails
      rails (~> 4.2.0)
      railties (~> 4.2.0)
      underscore-rails
    cocaine (0.5.7)
      climate_control (>= 0.0.3, < 1.0)
    coffee-rails (4.1.0)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.9.1.1)
    content_for_in_controllers (0.0.2)
    daemons (1.2.3)
    devise (3.5.3)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      responders
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    erubis (2.7.0)
    eventmachine (1.0.8)
    execjs (2.6.0)
    faraday (0.9.2)
      multipart-post (>= 1.2, < 3)
    font-awesome-rails (4.5.0.0)
      railties (>= 3.2, < 5.0)
    foreman (0.78.0)
      thor (~> 0.19.1)
    formtastic (3.1.3)
      actionpack (>= 3.2.13)
    formtastic_i18n (0.4.1)
    globalid (0.3.6)
      activesupport (>= 4.1.0)
    has_scope (0.6.0)
      actionpack (>= 3.2, < 5)
      activesupport (>= 3.2, < 5)
    i18n (0.7.0)
    inherited_resources (1.6.0)
      actionpack (>= 3.2, < 5)
      has_scope (~> 0.6.0.rc)
      railties (>= 3.2, < 5)
      responders
    jquery-rails (4.0.5)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jquery-turbolinks (2.1.0)
      railties (>= 3.1.0)
      turbolinks
    jquery-ui-rails (5.0.5)
      railties (>= 3.2.16)
    json (1.8.3)
    jwt (1.5.2)
    kaminari (0.16.3)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    kgio (2.10.0)
    libv8 (3.16.14.7)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    mime-types (2.6.2)
    mimemagic (0.3.0)
    mini_portile (0.6.2)
    minitest (5.8.2)
    momentjs-rails (2.10.6)
      railties (>= 3.1)
    multi_json (1.11.2)
    multi_xml (0.5.5)
    multipart-post (2.0.0)
    nokogiri (1.6.6.2)
      mini_portile (~> 0.6.0)
    oauth (0.4.7)
    oauth2 (1.0.0)
      faraday (>= 0.8, < 0.10)
      jwt (~> 1.0)
      multi_json (~> 1.3)
      multi_xml (~> 0.5)
      rack (~> 1.2)
    orm_adapter (0.5.0)
    paperclip (4.3.1)
      activemodel (>= 3.2.0)
      activesupport (>= 3.2.0)
      cocaine (~> 0.5.5)
      mime-types
      mimemagic (= 0.3.0)
    polyamorous (1.3.0)
      activerecord (>= 3.0)
    rack (1.6.4)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.4)
      actionmailer (= 4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      activemodel (= 4.2.4)
      activerecord (= 4.2.4)
      activesupport (= 4.2.4)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.4)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.7)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.2)
      loofah (~> 2.0)
    railties (4.2.4)
      actionpack (= 4.2.4)
      activesupport (= 4.2.4)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    raindrops (0.15.0)
    rake (10.4.2)
    ransack (1.7.0)
      actionpack (>= 3.0)
      activerecord (>= 3.0)
      activesupport (>= 3.0)
      i18n
      polyamorous (~> 1.2)
    ref (1.0.5)
    responders (2.1.1)
      railties (>= 4.2.0, < 5.1)
    sass (3.4.20)
    sass-rails (5.0.4)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    sorcery (0.9.1)
      bcrypt (~> 3.1)
      oauth (~> 0.4, >= 0.4.4)
      oauth2 (>= 0.8.0)
    spring (1.4.0)
    sprockets (3.4.0)
      rack (> 1, < 3)
    sprockets-rails (2.3.3)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
    sqlite3 (1.3.11)
    therubyracer (0.12.2)
      libv8 (~> 3.16.14.0)
      ref
    thin (1.6.4)
      daemons (~> 1.0, >= 1.0.9)
      eventmachine (~> 1.0, >= 1.0.4)
      rack (~> 1.0)
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (2.0.1)
    turbolinks (2.5.3)
      coffee-rails
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (2.7.2)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    underscore-rails (1.8.3)
    unicorn (5.0.1)
      kgio (~> 2.6)
      rack
      raindrops (~> 0.7)
    warden (1.2.4)
      rack (>= 1.0)
    will_paginate (3.0.7)
    will_paginate-bootstrap (1.0.1)
      will_paginate (>= 3.0.3)

PLATFORMS
  ruby

DEPENDENCIES
  activeadmin
  bootstrap_flash_messages (~> 1.0.1)
  clndr-rails
  content_for_in_controllers
  devise
  font-awesome-rails
  foreman
  jquery-rails
  jquery-turbolinks
  paperclip
  rails (= 4.2.4)
  sorcery
  spring
  sprockets
  sqlite3
  therubyracer
  thin
  turbolinks
  uglifier (>= 1.3.0)
  underscore-rails
  unicorn
  will_paginate-bootstrap

1 个答案:

答案 0 :(得分:0)

根据ActiveAdmin的documentation,您必须在sass-rails(以及Gemfile)中加入MetaSearch

# Gemfile
gem 'activeadmin'
gem 'sass-rails'
gem 'meta_search'

希望它有所帮助!