Rails ActionView :: MissingTemplate错误?

时间:2014-02-25 05:40:04

标签: ruby-on-rails-4

我已经在这一天中度过了一天的大部分时间,希望有人比我知道的更能在两秒内解决。

我有一个spree / rails应用程序在我的本地开发盒上正常工作但在服务器上当我尝试发布到“/ orders / populate”时它会一直崩溃。

它说MissingTemplate,无法判断这是否是一个警告,或者这实际上是致命的错误。无论如何,如果我去site.com/404页面工作正常,我有这条路线get "404" => "pages#error404"将其发送到工作页面。

I, [2014-02-25T06:33:01.693899 #18826]  INFO -- : Started POST "/orders/populate" for 65.53.4.81 at 2014-02-25 06:33:01 +0100
I, [2014-02-25T06:33:02.142190 #18826]  INFO -- : Processing by Spree::OrdersController#populate as HTML
I, [2014-02-25T06:33:02.147701 #18826]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"ChLxG3GWeEK8S31WdDdOZvVG9/9nsVVsQYzHuog6iZM=", "variants"=>{"6340"=>"1"}}
D, [2014-02-25T06:33:02.212119 #18826] DEBUG -- :   Spree::User Load (5.1ms)  SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."id" = 4 ORDER BY "spree_users"."id" ASC LIMIT 1
D, [2014-02-25T06:33:02.543884 #18826] DEBUG -- :   Spree::Preference Load (1.9ms)  SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/frontend_configuration/locale' LIMIT 1
D, [2014-02-25T06:33:02.580552 #18826] DEBUG -- :   Spree::Order Load (7.0ms)  SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."user_id" = $1 AND "spree_orders"."completed_at" IS NULL AND "spree_orders"."created_by_id" = 4 ORDER BY created_at DESC LIMIT 1  [["user_id", 4]]
D, [2014-02-25T06:33:02.709049 #18826] DEBUG -- :   Spree::Order Load (1.1ms)  SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = 14 AND "spree_orders"."currency" = 'USD' LIMIT 1
D, [2014-02-25T06:33:02.780039 #18826] DEBUG -- :   Spree::Adjustment Load (6.9ms)  SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_type" = 'Spree::Order' AND "spree_adjustments"."adjustable_id" IN (14) ORDER BY spree_adjustments.created_at ASC
D, [2014-02-25T06:33:02.785602 #18826] DEBUG -- :   Spree::Order Load (1.2ms)  SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."number" IS NULL LIMIT 1
D, [2014-02-25T06:33:02.810045 #18826] DEBUG -- :    (4.3ms)  SELECT COUNT(*) FROM "spree_roles" INNER JOIN "spree_roles_users" ON "spree_roles"."id" = "spree_roles_users"."role_id" WHERE "spree_roles_users"."user_id" = $1 AND "spree_roles"."name" = 'admin'  [["user_id", 4]]
D, [2014-02-25T06:33:02.825458 #18826] DEBUG -- :   Spree::Variant Load (4.6ms)  SELECT "spree_variants".* FROM "spree_variants" WHERE "spree_variants"."id" = $1 AND ("spree_variants".deleted_at IS NULL) LIMIT 1  [["id", "6340"]]
D, [2014-02-25T06:33:02.909932 #18826] DEBUG -- :   Spree::LineItem Load (3.4ms)  SELECT "spree_line_items".* FROM "spree_line_items" WHERE "spree_line_items"."order_id" = $1 ORDER BY created_at ASC  [["order_id", 14]]
D, [2014-02-25T06:33:02.971996 #18826] DEBUG -- :    (0.7ms)  BEGIN
D, [2014-02-25T06:33:03.145149 #18826] DEBUG -- :   Spree::Variant Load (1.7ms)  SELECT "spree_variants".* FROM "spree_variants" WHERE "spree_variants"."id" = $1 ORDER BY "spree_variants"."id" ASC LIMIT 1  [["id", 6340]]
D, [2014-02-25T06:33:03.164429 #18826] DEBUG -- :   Spree::Product Load (4.8ms)  SELECT "spree_products".* FROM "spree_products" WHERE "spree_products"."id" = $1 ORDER BY "spree_products"."id" ASC LIMIT 1  [["id", 6334]]
D, [2014-02-25T06:33:03.236665 #18826] DEBUG -- :   Spree::TaxCategory Load (2.3ms)  SELECT "spree_tax_categories".* FROM "spree_tax_categories" WHERE "spree_tax_categories"."id" = $1 AND ("spree_tax_categories".deleted_at IS NULL) LIMIT 1  [["id", 1]]
D, [2014-02-25T06:33:03.238493 #18826] DEBUG -- :    (0.7ms)  ROLLBACK
I, [2014-02-25T06:33:03.252370 #18826]  INFO -- : Completed 500 Internal Server Error in 1104ms
F, [2014-02-25T06:33:03.256794 #18826] FATAL -- : 
ActionView::MissingTemplate (Missing template home/toner/public/404 with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee, :haml, :rabl], :versions=>[:v1]}. Searched in:
  * "/home/toner/app/views"
  * "/usr/local/rvm/gems/ruby-2.0.0-p247/bundler/gems/spree_gateway-ab4dcb885418/app/views"
  * "/usr/local/rvm/gems/ruby-2.0.0-p247/bundler/gems/spree_auth_devise-c27fac85b082/app/views"
  * "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-3.0.3/app/views"
  * "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/spree_frontend-2.1.2/app/views"
  * "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/spree_backend-2.1.2/app/views"
  * "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/spree_api-2.1.2/app/views"
  * "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/spree_core-2.1.2/app/views"
  * "/usr/local/rvm/gems/ruby-2.0.0-p247/gems/kaminari-0.14.1/app/views"
  * "/home/toner"
  * "/"
):
  actionpack (4.0.0) lib/action_view/path_set.rb:46:in `find'
  actionpack (4.0.0) lib/action_view/lookup_context.rb:115:in `find'
  actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:18:in `find_template'
  actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:27:in `block in determine_template'
  actionpack (4.0.0) lib/action_view/lookup_context.rb:136:in `with_fallbacks'
  actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:18:in `with_fallbacks'
  actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:27:in `determine_template'
  actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:8:in `render'
  actionpack (4.0.0) lib/action_view/renderer/renderer.rb:42:in `render_template'
  actionpack (4.0.0) lib/action_view/renderer/renderer.rb:23:in `render'
  actionpack (4.0.0) lib/abstract_controller/rendering.rb:127:in `_render_template'
  actionpack (4.0.0) lib/action_controller/metal/streaming.rb:219:in `_render_template'
  actionpack (4.0.0) lib/abstract_controller/rendering.rb:120:in `render_to_body'
  actionpack (4.0.0) lib/action_controller/metal/rendering.rb:33:in `render_to_body'
  actionpack (4.0.0) lib/action_controller/metal/renderers.rb:26:in `render_to_body'
  actionpack (4.0.0) lib/abstract_controller/rendering.rb:97:in `render'
  actionpack (4.0.0) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
  activesupport (4.0.0) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
  activesupport (4.0.0) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
  actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
  activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:40:in `render'
  spree_core (2.1.2) lib/spree/core/controller_helpers/common.rb:57:in `block (2 levels) in render_404'
  actionpack (4.0.0) lib/action_controller/metal/mime_responds.rb:191:in `call'
  actionpack (4.0.0) lib/action_controller/metal/mime_responds.rb:191:in `respond_to'
  spree_core (2.1.2) lib/spree/core/controller_helpers/common.rb:56:in `render_404'
  activesupport (4.0.0) lib/active_support/rescuable.rb:81:in `call'
  activesupport (4.0.0) lib/active_support/rescuable.rb:81:in `rescue_with_handler'
  actionpack (4.0.0) lib/action_controller/metal/rescue.rb:15:in `rescue_with_handler'
  actionpack (4.0.0) lib/action_controller/metal/rescue.rb:32:in `rescue in process_action'
  actionpack (4.0.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
  actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
  activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.0.0) lib/abstract_controller/base.rb:136:in `process'
  actionpack (4.0.0) lib/abstract_controller/rendering.rb:44:in `process'
  actionpack (4.0.0) lib/action_controller/metal.rb:195:in `dispatch'
  actionpack (4.0.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.0.0) lib/action_controller/metal.rb:231:in `block in action'
  actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `call'
  actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
  actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:48:in `call'
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call'
  railties (4.0.0) lib/rails/engine.rb:511:in `call'
  railties (4.0.0) lib/rails/railtie/configurable.rb:30:in `method_missing'
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
  actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `catch'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.5.2) lib/rack/etag.rb:23:in `call'
  rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
  rack (1.5.2) lib/rack/head.rb:11:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/flash.rb:241:in `call'
  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/cookies.rb:486:in `call'
  activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__891893256__call__callbacks'
  activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
  activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
  activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
  activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
  railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
  actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
  railties (4.0.0) lib/rails/engine.rb:511:in `call'
  railties (4.0.0) lib/rails/application.rb:97:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
  /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
  /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
  /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

1 个答案:

答案 0 :(得分:2)

正在404.html目录中查找public/,确保文件在那里。