所以我让自己陷入了困境。我试图改变一些东西,以便某个样式表只会加载某个视图。结果并不顺利,所以我决定尝试恢复之前的提交并覆盖它。
所以我这样做。
这是heroku报道的:
NoMethodError: undefined method `[]' for nil:NilClass
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/sass_processor.rb:278:in `sprockets_context'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/sass_processor.rb:124:in `asset_path'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/sass_processor.rb:137:in `asset_url'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/script/tree/funcall.rb:140:in `_perform'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/script/tree/node.rb:50:in `perform'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:395:in `visit_prop'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `block in with_base'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:115:in `with_frame'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `with_base'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `block (2 levels) in visit_rule'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `map'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `block in visit_rule'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:429:in `visit_rule'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `block in with_base'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:115:in `with_frame'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `with_base'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:52:in `map'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:52:in `visit_children'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `block in visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:157:in `visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:8:in `visit'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/root_node.rb:36:in `css_tree'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/root_node.rb:20:in `render'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/engine.rb:278:in `render'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/sass_compressor.rb:48:in `call'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/sass_compressor.rb:28:in `call'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/loader.rb:60:in `block in load'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/loader.rb:318:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/loader.rb:44:in `load'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `yield'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `load'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/base.rb:66:in `find_asset'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:142:in `block in find'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:225:in `block in stat_tree'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:209:in `block in stat_directory'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:206:in `each'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:206:in `stat_directory'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:224:in `stat_tree'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:105:in `each'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:104:in `each'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:104:in `logical_paths'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:140:in `find'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:168:in `compile'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-3.0.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/rake/sprocketstask.rb:147:in `with_logger'
remote: /tmp/build_149e652f316d40cb5eb65c32c7006dc6/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-3.0.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
这是我第一次推送它以前的提交工作正常。现在它似乎根本不起作用。我正在使用命令git push heroku master --force
,以便git将我目录中的内容的精确副本发送到Heroku服务器。某些东西搞砸了,我不知道这个错误信息告诉我什么。
答案 0 :(得分:1)
通过反复试验OP和我自己发现:
执行git add .
时,请确保您不包含会抛弃Heroku的文件或目录。您应该按照GitHub's Rails .gitignore
一些可以甩掉Heroku的文件和目录:
tmp
个文件或目录log
个文件或目录seeds.rb
或架构