daily pastebin goal
22%
SHARE
TWEET

NoMethodError undefined method formats for modify:String

charlie-bin Mar 22nd, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. => Booting Puma
  2. => Rails 5.2.1 application starting in development
  3. => Run `rails server -h` for more startup options
  4. Puma starting in single mode...
  5. * Version 3.12.0 (ruby 2.5.3-p105), codename: Llamas in Pajamas
  6. * Min threads: 5, max threads: 5
  7. * Environment: development
  8. * Listening on tcp://0.0.0.0:3000
  9. Use Ctrl-C to stop
  10. Started GET "/purchase_orders/modify?prid=1" for 127.0.0.1 at 2019-03-22 13:26:41 +0800
  11.    (0.4ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
  12.   ↳ /home/sysadmin/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.1/lib/active_record/log_subscriber.rb:98
  13. Processing by PurchaseOrdersController#modify as HTML
  14.   Parameters: {"prid"=>"1"}
  15.   PurchaseRequest Load (0.3ms)  SELECT  "purchase_requests".* FROM "purchase_requests" WHERE "purchase_requests"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  16.   ↳ app/controllers/purchase_orders_controller.rb:20
  17.   PurchaseOrder Load (0.8ms)  SELECT  "purchase_orders".* FROM "purchase_orders" WHERE "purchase_orders"."purchase_request_id" = $1 ORDER BY "purchase_orders"."id" ASC LIMIT $2  [["purchase_request_id", 1], ["LIMIT", 1]]
  18.   ↳ app/controllers/purchase_orders_controller.rb:21
  19.   Rendering purchase_orders/modify.slim within layouts/application
  20.   Rendered partials/_nav_pr.slim (13.7ms)
  21.   PurchaseOrder Load (0.3ms)  SELECT "purchase_orders".* FROM "purchase_orders" WHERE "purchase_orders"."purchase_request_id" = $1  [["purchase_request_id", 1]]
  22.   ↳ app/views/purchase_orders/modify.slim:38
  23.   Rendered purchase_orders/modify.slim within layouts/application (60.7ms)
  24.   Rendered partials/_top_nav.slim (9.6ms)
  25. Completed 200 OK in 408ms (Views: 372.4ms | ActiveRecord: 6.2ms)
  26.  
  27.  
  28. Started GET "/po/1.pdf" for 127.0.0.1 at 2019-03-22 13:26:57 +0800
  29. Processing by PurchaseOrdersController#report_pdf as PDF
  30.   Parameters: {"id"=>"1"}
  31.   PurchaseOrder Load (0.2ms)  SELECT  "purchase_orders".* FROM "purchase_orders" WHERE "purchase_orders"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  32.   ↳ app/pdfs/purchase_order_report_pdf.rb:8
  33.   PurchaseRequest Load (0.3ms)  SELECT  "purchase_requests".* FROM "purchase_requests" WHERE "purchase_requests"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  34.   ↳ app/pdfs/purchase_order_report_pdf.rb:9
  35.   Abstract Load (0.3ms)  SELECT  "abstracts".* FROM "abstracts" WHERE "abstracts"."purchase_request_id" = $1 LIMIT $2  [["purchase_request_id", 1], ["LIMIT", 1]]
  36.   ↳ app/pdfs/purchase_order_report_pdf.rb:10
  37. PDF's built-in fonts have very limited support for internationalized text.
  38. If you need full UTF-8 support, consider using a TTF font instead.
  39.  
  40. To disable this warning, add the following line to your code:
  41. Prawn::Font::AFM.hide_m17n_warning = true
  42.  AbstractItem Load (0.5ms)  SELECT "abstract_items".* FROM "abstract_items" WHERE "abstract_items"."abstract_id" = $1 AND "abstract_items"."awardee" = $2  [["abstract_id", 1], ["awardee", "KING LEE ENTERPRISES"]]
  43.  ↳ app/pdfs/purchase_order_report_pdf.rb:129
  44.  PurchaseRequestItem Load (0.3ms)  SELECT  "purchase_request_items".* FROM "purchase_request_items" WHERE "purchase_request_items"."id" = $1 LIMIT $2  [["id", 2], ["LIMIT", 1]]
  45.  ↳ app/pdfs/purchase_order_report_pdf.rb:130
  46.  Rendering text template
  47.  Rendered text template (0.0ms)
  48. Sent data  (1.0ms)
  49. Completed 200 OK in 537ms (Views: 0.9ms | ActiveRecord: 7.7ms)
  50.  
  51.  
  52. Started GET "/purchase_orders/modify?prid=1" for 127.0.0.1 at 2019-03-22 13:27:11 +0800
  53. Processing by PurchaseOrdersController#modify as HTML
  54.  Parameters: {"prid"=>"1"}
  55.  PurchaseRequest Load (0.2ms)  SELECT  "purchase_requests".* FROM "purchase_requests" WHERE "purchase_requests"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  56.  ↳ app/controllers/purchase_orders_controller.rb:20
  57.  PurchaseOrder Load (0.2ms)  SELECT  "purchase_orders".* FROM "purchase_orders" WHERE "purchase_orders"."purchase_request_id" = $1 ORDER BY "purchase_orders"."id" ASC LIMIT $2  [["purchase_request_id", 1], ["LIMIT", 1]]
  58.  ↳ app/controllers/purchase_orders_controller.rb:21
  59. Completed 500 Internal Server Error in 6ms (ActiveRecord: 0.5ms)
  60.  
  61.  
  62.  
  63. NoMethodError (undefined method `formats' for "modify":String
  64. Did you mean?  form_tag):
  65.  
  66. actionview (5.2.1) lib/action_view/renderer/template_renderer.rb:12:in `render'
  67. actionview (5.2.1) lib/action_view/renderer/renderer.rb:44:in `render_template'
  68. actionview (5.2.1) lib/action_view/renderer/renderer.rb:25:in `render'
  69. actionview (5.2.1) lib/action_view/rendering.rb:103:in `_render_template'
  70. actionpack (5.2.1) lib/action_controller/metal/streaming.rb:219:in `_render_template'
  71. actionview (5.2.1) lib/action_view/rendering.rb:84:in `render_to_body'
  72. actionpack (5.2.1) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
  73. actionpack (5.2.1) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
  74. actionpack (5.2.1) lib/abstract_controller/rendering.rb:25:in `render'
  75. actionpack (5.2.1) lib/action_controller/metal/rendering.rb:36:in `render'
  76. actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
  77. activesupport (5.2.1) lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
  78. /home/sysadmin/.rbenv/versions/2.5.3/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
  79. activesupport (5.2.1) lib/active_support/core_ext/benchmark.rb:14:in `ms'
  80. actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
  81. actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
  82. activerecord (5.2.1) lib/active_record/railties/controller_runtime.rb:31:in `cleanup_view_runtime'
  83. actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:45:in `render'
  84. actionpack (5.2.1) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
  85. actionpack (5.2.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
  86. actionpack (5.2.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `tap'
  87. actionpack (5.2.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
  88. actionpack (5.2.1) lib/abstract_controller/base.rb:194:in `process_action'
  89. actionpack (5.2.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
  90. actionpack (5.2.1) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
  91. activesupport (5.2.1) lib/active_support/callbacks.rb:109:in `block in run_callbacks'
  92. audited (4.7.1) lib/audited/sweeper.rb:14:in `around'
  93. activesupport (5.2.1) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
  94. audited (4.7.1) lib/audited/sweeper.rb:14:in `around'
  95. activesupport (5.2.1) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
  96. activesupport (5.2.1) lib/active_support/callbacks.rb:136:in `run_callbacks'
  97. actionpack (5.2.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
  98. actionpack (5.2.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
  99. actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
  100. activesupport (5.2.1) lib/active_support/notifications.rb:168:in `block in instrument'
  101. activesupport (5.2.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
  102. activesupport (5.2.1) lib/active_support/notifications.rb:168:in `instrument'
  103. actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
  104. actionpack (5.2.1) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
  105. activerecord (5.2.1) lib/active_record/railties/controller_runtime.rb:24:in `process_action'
  106. actionpack (5.2.1) lib/abstract_controller/base.rb:134:in `process'
  107. actionview (5.2.1) lib/action_view/rendering.rb:32:in `process'
  108. actionpack (5.2.1) lib/action_controller/metal.rb:191:in `dispatch'
  109. actionpack (5.2.1) lib/action_controller/metal.rb:252:in `dispatch'
  110. actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
  111. actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:34:in `serve'
  112. actionpack (5.2.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
  113. actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `each'
  114. actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `serve'
  115. actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
  116. rack (2.0.6) lib/rack/tempfile_reaper.rb:15:in `call'
  117. rack (2.0.6) lib/rack/etag.rb:25:in `call'
  118. rack (2.0.6) lib/rack/conditional_get.rb:25:in `call'
  119. rack (2.0.6) lib/rack/head.rb:12:in `call'
  120. actionpack (5.2.1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
  121. rack (2.0.6) lib/rack/session/abstract/id.rb:232:in `context'
  122. rack (2.0.6) lib/rack/session/abstract/id.rb:226:in `call'
  123. actionpack (5.2.1) lib/action_dispatch/middleware/cookies.rb:670:in `call'
  124. activerecord (5.2.1) lib/active_record/migration.rb:559:in `call'
  125. actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  126. activesupport (5.2.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
  127. actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
  128. actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
  129. actionpack (5.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
  130. web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
  131. web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call'
  132. web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
  133. web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
  134. actionpack (5.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
  135. railties (5.2.1) lib/rails/rack/logger.rb:38:in `call_app'
  136. railties (5.2.1) lib/rails/rack/logger.rb:26:in `block in call'
  137. activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
  138. activesupport (5.2.1) lib/active_support/tagged_logging.rb:28:in `tagged'
  139. activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `tagged'
  140. railties (5.2.1) lib/rails/rack/logger.rb:26:in `call'
  141. sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
  142. actionpack (5.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
  143. actionpack (5.2.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
  144. rack (2.0.6) lib/rack/method_override.rb:22:in `call'
  145. rack (2.0.6) lib/rack/runtime.rb:22:in `call'
  146. activesupport (5.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
  147. actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
  148. actionpack (5.2.1) lib/action_dispatch/middleware/static.rb:127:in `call'
  149. rack (2.0.6) lib/rack/sendfile.rb:111:in `call'
  150. railties (5.2.1) lib/rails/engine.rb:524:in `call'
  151. puma (3.12.0) lib/puma/configuration.rb:225:in `call'
  152. puma (3.12.0) lib/puma/server.rb:658:in `handle_request'
  153. puma (3.12.0) lib/puma/server.rb:472:in `process_client'
  154. puma (3.12.0) lib/puma/server.rb:332:in `block in run'
  155. puma (3.12.0) lib/puma/thread_pool.rb:133:in `block in spawn_thread'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top