ruby-on-rails – Heroku Push失败:“未定义的方法”
发布时间:2020-12-17 01:55:30 所属栏目:百科 来源:网络整理
导读:嘿我在将我的rails项目推送到heroku时遇到了一些麻烦,我收到了以下错误: remote: Running: rake assets:precompileremote: I,[2015-07-24T19:05:36.903629 #973] INFO -- : Writing /tmp/build_9e450c140b29b08f655c356ad7f8fe81/public/assets/application
嘿我在将我的rails项目推送到heroku时遇到了一些麻烦,我收到了以下错误:
remote: Running: rake assets:precompile remote: I,[2015-07-24T19:05:36.903629 #973] INFO -- : Writing /tmp/build_9e450c140b29b08f655c356ad7f8fe81/public/assets/application-3dba84f3550d057a7ebd21940bb94ece39b0ea686486aaaf4c32bb2fda950496.js remote: rake aborted! remote: NoMethodError: undefined method `[]' for nil:NilClass remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:266:in `sprockets_context' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:112:in `asset_path' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:188:in `font_path' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:140:in `_perform' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/node.rb:50:in `perform' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:402:in `visit_return' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `block in visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:79:in `block in with_base' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:79:in `with_base' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:8:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:248:in `block (3 levels) in perform_sass_fn' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:248:in `each' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:248:in `block (2 levels) in perform_sass_fn' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:247:in `catch' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:247:in `block in perform_sass_fn' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:84:in `perform_arguments' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:244:in `perform_sass_fn' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:131:in `_perform' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/node.rb:50:in `perform' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/operation.rb:64:in `_perform' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/script/tree/node.rb:50:in `perform' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:468:in `visit_variable' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `block in visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:79:in `block in with_base' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:79:in `with_base' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `block (2 levels) in visit_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `map' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `block in visit_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:88:in `block in with_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:88:in `with_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:322:in `visit_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `block in visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:79:in `block in with_base' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:79:in `with_base' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `block (2 levels) in visit_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `map' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `block in visit_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:88:in `block in with_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:88:in `with_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:322:in `visit_import' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `block in visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:79:in `block in with_base' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/stack.rb:79:in `with_base' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:52:in `block in visit_children' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:52:in `map' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:52:in `visit_children' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:179:in `with_environment' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:166:in `visit_children' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `block in visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:186:in `visit_root' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:157:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:8:in `visit' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/root_node.rb:36:in `css_tree' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/tree/root_node.rb:20:in `render' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sass-3.4.16/lib/sass/engine.rb:278:in `render' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/sass_compressor.rb:48:in `call' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/sass_compressor.rb:28:in `call' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:63:in `find_asset' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:70:in `find_all_linked_assets' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:138:in `block in find' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:223:in `block in stat_tree' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:207:in `block in stat_directory' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `each' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `stat_directory' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:222:in `stat_tree' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `each' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `block in logical_paths' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:104:in `each' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:104:in `logical_paths' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:136:in `find' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:162:in `compile' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/rake/sprocketstask.rb:147:in `with_logger' remote: /tmp/build_9e450c140b29b08f655c356ad7f8fe81/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define' remote: Tasks: TOP => assets:precompile remote: (See full trace by running task with --trace) remote: ! remote: ! Precompiling assets failed. remote: ! remote: Tt似乎与js文件有关.如果有任何帮助,我正在使用云9. 我的gemfile: source 'https://rubygems.org' gem 'rails','4.2.2' gem 'bcrypt','3.1.7' gem 'bootstrap-sass','3.2.0.0' gem 'sass-rails','5.0.2' gem 'uglifier','2.5.3' gem 'coffee-rails','4.1.0' gem 'jquery-rails','4.0.3' gem 'turbolinks','2.3.0' gem 'jbuilder','2.2.3' gem 'sdoc','0.4.0',group: :doc group :development,:test do gem 'sqlite3','1.3.9' gem 'byebug','3.4.0' gem 'web-console','2.0.0.beta3' gem 'spring','1.1.3' end group :test do gem 'minitest-reporters','1.0.5' gem 'mini_backtrace','0.1.3' gem 'guard-minitest','2.3.1' end group :production do gem 'pg','0.17.1' gem 'rails_12factor','0.0.2' end 我的application.js文件: // This is a manifest file that'll be compiled into application.js,which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory,lib/assets/javascripts,vendor/assets/javascripts,// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. // // It's not advisable to add code directly here,but if you do,it'll appear at the bottom of the // compiled file. // // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // about supported directives. // //= require jquery //= require jquery_ujs //= require bootstrap //= require turbolinks //= require_tree . 我以前在尝试推送到heroku时遇到了数据库问题,如果相关,我将database.yml文件更改为以下内容: development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: postgresql database: treebook pool: 5 timeout: 5000 任何帮助都会非常感激,因为过去几天我一直无法解决这个问题. 该项目的github回购:https://github.com/Ghrehh/sitenew 编辑: I,[2015-07-25T09:07:44.231727 #10217] INFO -- : Writing /home/ubuntu/workspace/sitenew/public/assets/application-3dba84f3550d057a7ebd21940bb94ece39b0ea686486aaaf4c32bb2fda950496.js rake aborted! NoMethodError: undefined method `[]' for nil:NilClass /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:266:in `sprockets_context' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:112:in `asset_path' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:188:in `font_path' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:140:in `_perform' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/node.rb:50:in `perform' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:402:in `visit_return' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `block in visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:79:in `block in with_base' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:79:in `with_base' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:8:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:248:in `block (3 levels) in perform_sass_fn' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:248:in `each' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:248:in `block (2 levels) in perform_sass_fn' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:247:in `catch' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:247:in `block in perform_sass_fn' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:84:in `perform_arguments' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:244:in `perform_sass_fn' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/funcall.rb:131:in `_perform' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/node.rb:50:in `perform' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/operation.rb:64:in `_perform' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/script/tree/node.rb:50:in `perform' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:468:in `visit_variable' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `block in visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:79:in `block in with_base' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:79:in `with_base' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `block (2 levels) in visit_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `map' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `block in visit_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:88:in `block in with_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:88:in `with_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:322:in `visit_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `block in visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:79:in `block in with_base' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:79:in `with_base' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `block (2 levels) in visit_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `map' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:325:in `block in visit_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:88:in `block in with_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:88:in `with_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:322:in `visit_import' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `block in visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:79:in `block in with_base' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:115:in `with_frame' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/stack.rb:79:in `with_base' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:158:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:52:in `block in visit_children' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:52:in `map' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:52:in `visit_children' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:179:in `with_environment' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:166:in `visit_children' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `block in visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:186:in `visit_root' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/base.rb:36:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:157:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/visitors/perform.rb:8:in `visit' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/root_node.rb:36:in `css_tree' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/tree/root_node.rb:20:in `render' /usr/local/rvm/gems/ruby-2.2.1/gems/sass-3.4.16/lib/sass/engine.rb:278:in `render' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/sass_compressor.rb:48:in `call' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/sass_compressor.rb:28:in `call' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/base.rb:63:in `find_asset' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/base.rb:70:in `find_all_linked_assets' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:138:in `block in find' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:223:in `block in stat_tree' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:207:in `block in stat_directory' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `each' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `stat_directory' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:222:in `stat_tree' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `each' /usr/local/rvm/gems/ruby-2.2.1/gems/sprockets- 解决方法
链接到我的CSS文件中不存在的文件,愚蠢的错误.不要盲目地复制和粘贴以前项目中的文件!
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |