未定义的方法`lookup_asset_for_path'

时间:2016-02-25 22:18:13

标签: ruby-on-rails ruby-on-rails-4 asset-pipeline ruby-on-rails-4.2

我刚刚将Rails 4应用更新到Rails 4.2,当我尝试加载应用时,我收到以下错误(带有堆栈跟踪):

NoMethodError - undefined method `lookup_asset_for_path' for #<#<Class:0x007ff78e8d5468>:0x007ff78e8dfc10>
Did you mean?  lookup_context:
  sprockets_better_errors (0.0.4) lib/sprockets_better_errors/sprockets_rails_helper.rb:85:in `check_errors_for'
  sprockets_better_errors (0.0.4) lib/sprockets_better_errors/sprockets_rails_helper.rb:72:in `block in stylesheet_link_tag'
  sprockets_better_errors (0.0.4) lib/sprockets_better_errors/sprockets_rails_helper.rb:71:in `stylesheet_link_tag'
  app/views/employers/sessions/new.html.erb:1:in `_app_views_employers_sessions_new_html_erb__3069494963734045487_70350612585440'
  actionview (4.2.5.1) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.5.1) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.5.1) lib/action_view/template.rb:333:in `instrument'
  actionview (4.2.5.1) lib/action_view/template.rb:143:in `render'
  actionview (4.2.5.1) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
  actionview (4.2.5.1) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.5.1) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.5.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.5.1) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.5.1) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  actionview (4.2.5.1) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
  actionview (4.2.5.1) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
  actionview (4.2.5.1) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
  actionview (4.2.5.1) lib/action_view/renderer/template_renderer.rb:14:in `render'
  actionview (4.2.5.1) lib/action_view/renderer/renderer.rb:42:in `render_template'
  actionview (4.2.5.1) lib/action_view/renderer/renderer.rb:23:in `render'
  actionview (4.2.5.1) lib/action_view/rendering.rb:100:in `_render_template'
  actionpack (4.2.5.1) lib/action_controller/metal/streaming.rb:217:in `_render_template'
  actionview (4.2.5.1) lib/action_view/rendering.rb:83:in `render_to_body'
  actionpack (4.2.5.1) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
  actionpack (4.2.5.1) lib/action_controller/metal/renderers.rb:37:in `render_to_body'
  actionpack (4.2.5.1) lib/abstract_controller/rendering.rb:25:in `render'
  actionpack (4.2.5.1) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.2.5.1) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  activesupport (4.2.5.1) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /Users/ACIDSTEALTH/.rubies/ruby-2.3.0/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
  activesupport (4.2.5.1) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.2.5.1) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  actionpack (4.2.5.1) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
  activerecord (4.2.5.1) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.2.5.1) lib/action_controller/metal/instrumentation.rb:43:in `render'
  responders (2.1.1) lib/action_controller/responder.rb:236:in `default_render'
  responders (2.1.1) lib/action_controller/responder.rb:170:in `to_html'
  responders (2.1.1) lib/action_controller/responder.rb:163:in `respond'
  responders (2.1.1) lib/action_controller/responder.rb:156:in `call'
  responders (2.1.1) lib/action_controller/respond_with.rb:205:in `respond_with'
  devise (3.5.6) app/controllers/devise/sessions_controller.rb:12:in `new'
  actionpack (4.2.5.1) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (4.2.5.1) lib/abstract_controller/base.rb:198:in `process_action'
  actionpack (4.2.5.1) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.2.5.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:117:in `call'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.5.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.5.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.5.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  activesupport (4.2.5.1) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.5.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.5.1) lib/active_support/notifications.rb:164:in `instrument'
  actionpack (4.2.5.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.2.5.1) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.2.5.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.2.5.1) lib/abstract_controller/base.rb:137:in `process'
  actionview (4.2.5.1) lib/action_view/rendering.rb:30:in `process'
  actionpack (4.2.5.1) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.2.5.1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.2.5.1) lib/action_controller/metal.rb:237:in `block in action'
  actionpack (4.2.5.1) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
  actionpack (4.2.5.1) lib/action_dispatch/routing/route_set.rb:43:in `serve'
  actionpack (4.2.5.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
  actionpack (4.2.5.1) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.5.1) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.5.1) lib/action_dispatch/routing/route_set.rb:815:in `call'
  omniauth (1.3.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.3.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.3.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
  rack (1.6.4) lib/rack/deflater.rb:35:in `call'
  warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.6) lib/warden/manager.rb:34:in `call'
  rack (1.6.4) lib/rack/etag.rb:24:in `call'
  rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
  rack (1.6.4) lib/rack/head.rb:13:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/flash.rb:260:in `call'
  rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  activerecord (4.2.5.1) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  activerecord (4.2.5.1) lib/active_record/migration.rb:377:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
  activesupport (4.2.5.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
  web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.5.1) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.5.1) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.5.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.5.1) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.5.1) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.5.1) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.5.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  actionpack (4.2.5.1) lib/action_dispatch/middleware/static.rb:116:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  railties (4.2.5.1) lib/rails/engine.rb:518:in `call'
  railties (4.2.5.1) lib/rails/application.rb:165:in `call'
  rack-reverse-proxy (0.10.0) lib/rack_reverse_proxy/roundtrip.rb:19:in `call'
  rack-reverse-proxy (0.10.0) lib/rack_reverse_proxy/middleware.rb:24:in `call'
  rack (1.6.4) lib/rack/deflater.rb:35:in `call'
  rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  puma (2.16.0) lib/puma/server.rb:557:in `handle_request'
  puma (2.16.0) lib/puma/server.rb:404:in `process_client'
  puma (2.16.0) lib/puma/server.rb:270:in `block in run'
  puma (2.16.0) lib/puma/thread_pool.rb:106:in `block in spawn_thread'

当网页控制台在页面上打开时,它指向我的stylesheet_link_tag作为罪魁祸首:

<%= stylesheet_link_tag "employers-auth", media: "all" %>

我尝试删除它以查看会发生什么,此时我收到与我的javascript_include_tag相同的错误。我一直在寻找有关这个问题的资源,但还没有找到。

我已经开始通过我的Gemfile升级我的宝石,看看是否有帮助,但到目前为止还没有。这是我的Gemfile:

source 'https://rubygems.org'

ruby '2.3.0'

gem 'rails', '4.2.5.1'
gem 'pg'
gem 'sass-rails', '~> 5.0.4'
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails', "~> 4.1"
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

gem 'puma'
gem 'resque', "~> 1.22.0", require: 'resque/server'
gem 'resque-scheduler', :require => 'resque_scheduler'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'bootstrap-sass'
gem 'font-awesome-rails', '~> 4.5.0.1'

gem 'aws-sdk-v1', '~> 1.66.0'
gem 'paperclip', '~> 4.3.1'
gem 'delayed_paperclip'
gem 'responders', '~> 2.1.1'
group :production do
    # Needs to be placed before paperclip-optimizer
    # gem 'image_optim_bin'
    gem 'image_optim'
    gem 'image_optim_pack'
end
gem 'paperclip-optimizer'

gem 'devise'
gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'omniauth-linkedin'
gem 'twitter'
gem 'twitter-text'
gem 'koala' # for Facebook Graph API
gem 'mimemagic'
gem 'linkedin'

gem 'active_model_serializers', '~> 0.8.1'
gem 'friendly_id', '~> 5.0.0' # Note: You MUST use 5.0.0 or greater for Rails 4.0+
gem 'will_paginate', '~> 3.0'

# For Mail
gem 'gibbon', '~> 1.2.0'
# gem 'newrelic_rpm' # Clashes with Resque (See issue #180 on GitHub)
gem 'intercom-rails', "~> 0.2.28" # This gem makes the Javascript API and Messenger available
gem 'intercom', "~> 2.5.4" # This gem is for sending events/attributes from the backend.

# for the blog
gem "rack-reverse-proxy", :require => "rack/reverse_proxy"

# For CMS
gem 'angular-ui-bootstrap-rails', '~> 0.12.1'

group :production do
    gem 'rails_12factor'
    gem 'heroku_rails_deflate'
    gem 'rack-timeout'
    gem 'exception_notification'
end

group :development do
    gem 'better_errors'
    gem 'sprockets_better_errors'
end

group :development, :test do
    gem 'web-console', '~> 2.0'
    gem 'spring'
    gem 'rspec-rails'
    gem 'capybara'
    gem 'launchy'
    gem 'factory_girl'
    gem 'valid_attribute'
    gem 'shoulda-matchers'
    gem 'pry-rails'
    gem 'faker'
    gem 'database_cleaner'
    gem 'dotenv-rails'
end

这是我的Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.2.5.1)
      actionpack (= 4.2.5.1)
      actionview (= 4.2.5.1)
      activejob (= 4.2.5.1)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.5.1)
      actionview (= 4.2.5.1)
      activesupport (= 4.2.5.1)
      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.5.1)
      activesupport (= 4.2.5.1)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    active_model_serializers (0.8.3)
      activemodel (>= 3.0)
    activejob (4.2.5.1)
      activesupport (= 4.2.5.1)
      globalid (>= 0.3.0)
    activemodel (4.2.5.1)
      activesupport (= 4.2.5.1)
      builder (~> 3.1)
    activerecord (4.2.5.1)
      activemodel (= 4.2.5.1)
      activesupport (= 4.2.5.1)
      arel (~> 6.0)
    activesupport (4.2.5.1)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    addressable (2.4.0)
    angular-ui-bootstrap-rails (0.12.1)
    arel (6.0.3)
    autoprefixer-rails (6.3.3.1)
      execjs
    aws-sdk-v1 (1.66.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
    bcrypt (3.1.10)
    better_errors (2.1.1)
      coderay (>= 1.0.0)
      erubis (>= 2.6.6)
      rack (>= 0.9.0)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    bootstrap-sass (3.3.6)
      autoprefixer-rails (>= 5.2.1)
      sass (>= 3.3.4)
    buftok (0.2.0)
    builder (3.2.2)
    capybara (2.6.2)
      addressable
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    cocaine (0.5.8)
      climate_control (>= 0.0.3, < 1.0)
    coderay (1.1.1)
    concurrent-ruby (1.0.0)
    database_cleaner (1.5.1)
    debug_inspector (0.0.2)
    delayed_paperclip (2.9.1)
      paperclip (>= 3.3)
    devise (3.5.6)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      responders
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    diff-lcs (1.2.5)
    domain_name (0.5.20160216)
      unf (>= 0.0.5, < 1.0.0)
    dotenv (2.1.0)
    dotenv-rails (2.1.0)
      dotenv (= 2.1.0)
      railties (>= 4.0, < 5.1)
    equalizer (0.0.10)
    erubis (2.7.0)
    exception_notification (4.1.4)
      actionmailer (~> 4.0)
      activesupport (~> 4.0)
    execjs (2.6.0)
    exifr (1.2.4)
    factory_girl (4.5.0)
      activesupport (>= 3.0.0)
    faker (1.6.3)
      i18n (~> 0.5)
    faraday (0.9.2)
      multipart-post (>= 1.2, < 3)
    font-awesome-rails (4.5.0.1)
      railties (>= 3.2, < 5.1)
    friendly_id (5.0.5)
      activerecord (>= 4.0.0)
    fspath (2.1.1)
    gibbon (1.2.1)
      httparty
      multi_json (>= 1.9.0)
    globalid (0.3.6)
      activesupport (>= 4.1.0)
    hashie (3.4.3)
    heroku_rails_deflate (1.0.3)
      actionpack (>= 3.2.13)
      activesupport (>= 3.2.13)
      rack (>= 1.4.5)
    http (1.0.2)
      addressable (~> 2.3)
      http-cookie (~> 1.0)
      http-form_data (~> 1.0.1)
      http_parser.rb (~> 0.6.0)
    http-cookie (1.0.2)
      domain_name (~> 0.5)
    http-form_data (1.0.1)
    http_parser.rb (0.6.0)
    httparty (0.13.7)
      json (~> 1.8)
      multi_xml (>= 0.5.2)
    i18n (0.7.0)
    image_optim (0.22.1)
      exifr (~> 1.2, >= 1.2.2)
      fspath (~> 2.1)
      image_size (~> 1.3)
      in_threads (~> 1.3)
      progress (~> 3.0, >= 3.0.1)
    image_optim_pack (0.2.1.20160221)
      fspath (~> 2.1)
      image_optim (~> 0.19)
    image_size (1.4.2)
    in_threads (1.3.1)
    intercom (2.5.4)
      json (~> 1.8)
    intercom-rails (0.2.30)
      activesupport (> 3.0)
    jbuilder (1.5.3)
      activesupport (>= 3.0.0)
      multi_json (>= 1.2.0)
    jquery-rails (4.1.0)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    json (1.8.3)
    jwt (1.5.1)
    koala (2.2.0)
      addressable
      faraday
      multi_json
    launchy (2.4.3)
      addressable (~> 2.3)
    linkedin (1.1.0)
      hashie (~> 3.0)
      multi_json (~> 1.0)
      oauth (~> 0.4)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    memoizable (0.4.2)
      thread_safe (~> 0.3, >= 0.3.1)
    method_source (0.8.2)
    mime-types (2.99.1)
    mimemagic (0.3.0)
    mini_portile2 (2.0.0)
    minitest (5.8.4)
    multi_json (1.11.2)
    multi_xml (0.5.5)
    multipart-post (2.0.0)
    naught (1.1.0)
    nokogiri (1.6.7.2)
      mini_portile2 (~> 2.0.0.rc2)
    oauth (0.5.0)
    oauth2 (1.1.0)
      faraday (>= 0.8, < 0.10)
      jwt (~> 1.0, < 1.5.2)
      multi_json (~> 1.3)
      multi_xml (~> 0.5)
      rack (>= 1.2, < 3)
    omniauth (1.3.1)
      hashie (>= 1.2, < 4)
      rack (>= 1.0, < 3)
    omniauth-facebook (3.0.0)
      omniauth-oauth2 (~> 1.2)
    omniauth-linkedin (0.2.0)
      omniauth-oauth (~> 1.0)
    omniauth-oauth (1.1.0)
      oauth
      omniauth (~> 1.0)
    omniauth-oauth2 (1.4.0)
      oauth2 (~> 1.0)
      omniauth (~> 1.2)
    omniauth-twitter (1.2.1)
      json (~> 1.3)
      omniauth-oauth (~> 1.1)
    orm_adapter (0.5.0)
    paperclip (4.3.5)
      activemodel (>= 3.2.0)
      activesupport (>= 3.2.0)
      cocaine (~> 0.5.5)
      mime-types
      mimemagic (= 0.3.0)
    paperclip-optimizer (2.0.0)
      image_optim (~> 0.19)
      paperclip (>= 3.4)
    pg (0.18.4)
    progress (3.1.1)
    pry (0.10.3)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    pry-rails (0.3.4)
      pry (>= 0.9.10)
    puma (2.16.0)
    rack (1.6.4)
    rack-protection (1.5.3)
      rack
    rack-proxy (0.5.17)
      rack
    rack-reverse-proxy (0.10.0)
      rack (>= 1.0.0)
      rack-proxy (~> 0.5, >= 0.5.14)
    rack-test (0.6.3)
      rack (>= 1.0)
    rack-timeout (0.3.2)
    rails (4.2.5.1)
      actionmailer (= 4.2.5.1)
      actionpack (= 4.2.5.1)
      actionview (= 4.2.5.1)
      activejob (= 4.2.5.1)
      activemodel (= 4.2.5.1)
      activerecord (= 4.2.5.1)
      activesupport (= 4.2.5.1)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.5.1)
      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.3)
      loofah (~> 2.0)
    rails_12factor (0.0.3)
      rails_serve_static_assets
      rails_stdout_logging
    rails_serve_static_assets (0.0.5)
    rails_stdout_logging (0.0.4)
    railties (4.2.5.1)
      actionpack (= 4.2.5.1)
      activesupport (= 4.2.5.1)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.5.0)
    redis (3.2.2)
    redis-namespace (1.5.2)
      redis (~> 3.0, >= 3.0.4)
    responders (2.1.1)
      railties (>= 4.2.0, < 5.1)
    resque (1.22.0)
      multi_json (~> 1.0)
      redis-namespace (~> 1.0)
      sinatra (>= 0.9.2)
      vegas (~> 0.1.2)
    resque-scheduler (2.2.0)
      redis (>= 3.0.0)
      resque (>= 1.20.0, < 1.25)
      rufus-scheduler (~> 2.0)
    rspec-core (3.4.3)
      rspec-support (~> 3.4.0)
    rspec-expectations (3.4.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.4.0)
    rspec-mocks (3.4.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.4.0)
    rspec-rails (3.4.2)
      actionpack (>= 3.0, < 4.3)
      activesupport (>= 3.0, < 4.3)
      railties (>= 3.0, < 4.3)
      rspec-core (~> 3.4.0)
      rspec-expectations (~> 3.4.0)
      rspec-mocks (~> 3.4.0)
      rspec-support (~> 3.4.0)
    rspec-support (3.4.1)
    rufus-scheduler (2.0.24)
      tzinfo (>= 0.3.22)
    sass (3.4.21)
    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)
    shoulda-matchers (3.1.1)
      activesupport (>= 4.0.0)
    simple_oauth (0.3.1)
    sinatra (1.4.7)
      rack (~> 1.5)
      rack-protection (~> 1.4)
      tilt (>= 1.3, < 3)
    slop (3.6.0)
    spring (1.6.3)
    sprockets (3.5.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.0.3)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sprockets_better_errors (0.0.4)
      sprockets-rails (>= 1.0.0)
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (2.0.2)
    twitter (5.16.0)
      addressable (~> 2.3)
      buftok (~> 0.2.0)
      equalizer (= 0.0.10)
      faraday (~> 0.9.0)
      http (~> 1.0)
      http_parser.rb (~> 0.6.0)
      json (~> 1.8)
      memoizable (~> 0.4.0)
      naught (~> 1.0)
      simple_oauth (~> 0.3.0)
    twitter-text (1.13.3)
      unf (~> 0.1.0)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (2.7.2)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.7.2)
    valid_attribute (2.0.0)
    vegas (0.1.11)
      rack (>= 1.0.0)
    warden (1.2.6)
      rack (>= 1.0)
    web-console (2.3.0)
      activemodel (>= 4.0)
      binding_of_caller (>= 0.7.2)
      railties (>= 4.0)
      sprockets-rails (>= 2.0, < 4.0)
    will_paginate (3.1.0)
    xpath (2.0.0)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  active_model_serializers (~> 0.8.1)
  angular-ui-bootstrap-rails (~> 0.12.1)
  aws-sdk-v1 (~> 1.66.0)
  better_errors
  bootstrap-sass
  capybara
  database_cleaner
  delayed_paperclip
  devise
  dotenv-rails
  exception_notification
  factory_girl
  faker
  font-awesome-rails (~> 4.5.0.1)
  friendly_id (~> 5.0.0)
  gibbon (~> 1.2.0)
  heroku_rails_deflate
  image_optim
  image_optim_pack
  intercom (~> 2.5.4)
  intercom-rails (~> 0.2.28)
  jbuilder (~> 1.2)
  jquery-rails (~> 4.1)
  koala
  launchy
  linkedin
  mimemagic
  omniauth
  omniauth-facebook
  omniauth-linkedin
  omniauth-twitter
  paperclip (~> 4.3.1)
  paperclip-optimizer
  pg
  pry-rails
  puma
  rack-reverse-proxy
  rack-timeout
  rails (= 4.2.5.1)
  rails_12factor
  responders (~> 2.1.1)
  resque (~> 1.22.0)
  resque-scheduler
  rspec-rails
  sass-rails (~> 5.0.4)
  shoulda-matchers
  spring
  sprockets_better_errors
  twitter
  twitter-text
  uglifier (>= 1.3.0)
  valid_attribute
  web-console (~> 2.0)
  will_paginate (~> 3.0)

BUNDLED WITH
   1.11.2

这是我的application.rb

require File.expand_path('../boot', __FILE__)

require 'rails/all'

Bundler.require(:default, Rails.env)

module MyApp
    class Application < Rails::Application
        # Turn on GZIP compression
        config.middleware.use Rack::Deflater

        config.i18n.enforce_available_locales = true
        I18n.config.enforce_available_locales = true
        config.assets.paths << "#{Rails.root}/app/assets/partials"
        config.autoload_paths += %W(#{config.root}/lib)
        config.assets.image_optim = false

        # Precompile additional assets.
        # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
        config.assets.paths << Rails.root.join("app", "assets", "fonts")
        config.assets.paths << Rails.root.join("app", "assets", "javascripts", "employers")

        # CSS Assets for precompilation
        config.assets.precompile += %w(
            framework_and_overrides.css
            employers-overrides.css
            employers.css
            employers-auth.css
            profiles.css
            global-widget.css
            style-widget.css
            widget.css
            profile-builder.css
            font-awesome.min.css
        )
        # JS Assets for precompilation
        config.assets.precompile += %w(
            angular-animate.js
            angular.min.js
            query-parser.js
            debounce.js
            column-resizer.js
            window-resize
            application.js
            employer-app.js
            app.js
            widget-app.js
            jquery.min.js
            twitter-text
        )
    end
end

1 个答案:

答案 0 :(得分:0)

根据您的评论,您的问题可能源于未正确使用资产预编译。

如果您打算使用样式表和javascript包含标记的employers-auth.jsemployers-auth.css个文件,则需要执行以下操作

# config/initializers/assets.rb
Rails.application.config.assets.version = '1.0'
Rails.application.config.assets.precompile += %w(employers-auth.css employers-auth.js)

无论您在config/application.rb中使用资产做什么,请将其撤消。您需要重新启动服务器