kuyio / bloak

Bloak is a markdown blog engine for Ruby on Rails
MIT License
35 stars 3 forks source link

Issue in admin view of adding new post #1

Closed poudelprakash closed 1 year ago

poudelprakash commented 1 year ago

Screenshot 2023-05-25 at 7 47 23 PM

Showing /Users/prakash/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/bundler/gems/bloak-a4c1e81ffbbd/app/views/bloak/admin/posts/_form.html.erb where line #29 raised:

wrong number of arguments (given 1, expected 0) Extracted source (around line #29):

<%= form.label :published_at, class: 'form-label' %> <%= form.date_field(:published_at, class: 'form-control', value: (DateTime.now.to_s(:friendly_short) unless post.published_at.present?)) %>
</div>

Tip: You may want to add gem 'error_highlight', '>= 0.4.0' into your Gemfile, which will display the fine-grained error location.

Trace of template inclusion: #<ActionView::Template /Users/prakash/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/bundler/gems/bloak-a4c1e81ffbbd/app/views/bloak/admin/posts/new.html.erb locals=[]>

Rails.root: /Users/prakash/workspaces/2023/invoice-work/eboshi

Application Trace | Framework Trace | Full Trace bloak (a4c1e81ffbbd) app/views/bloak/admin/posts/_form.html.erb:29:in to_s' bloak (a4c1e81ffbbd) app/views/bloak/admin/posts/_form.html.erb:29 rails (2dbc7dbac886) actionview/lib/action_view/helpers/capture_helper.rb:50:inblock in capture' rails (2dbc7dbac886) actionview/lib/action_view/buffers.rb:75:in capture' rails (2dbc7dbac886) actionview/lib/action_view/helpers/capture_helper.rb:50:incapture' rails (2dbc7dbac886) actionview/lib/action_view/helpers/form_helper.rb:773:in form_with' bloak (a4c1e81ffbbd) app/views/bloak/admin/posts/_form.html.erb:1 rails (2dbc7dbac886) actionview/lib/action_view/base.rb:264:inpublic_send' rails (2dbc7dbac886) actionview/lib/action_view/base.rb:264:in _run' rails (2dbc7dbac886) actionview/lib/action_view/template.rb:207:inblock in render' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:208:in instrument' rails (2dbc7dbac886) actionview/lib/action_view/template.rb:488:ininstrument_render_template' rails (2dbc7dbac886) actionview/lib/action_view/template.rb:201:in render' rails (2dbc7dbac886) actionview/lib/action_view/renderer/partial_renderer.rb:252:inblock in render_partial_template' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:206:in block in instrument' rails (2dbc7dbac886) activesupport/lib/active_support/notifications/instrumenter.rb:58:ininstrument' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:206:in instrument' rails (2dbc7dbac886) actionview/lib/action_view/renderer/partial_renderer.rb:246:inrender_partial_template' rails (2dbc7dbac886) actionview/lib/action_view/renderer/partial_renderer.rb:237:in render' rails (2dbc7dbac886) actionview/lib/action_view/renderer/renderer.rb:83:inrender_partial_to_object' rails (2dbc7dbac886) actionview/lib/action_view/renderer/renderer.rb:55:in render_partial' rails (2dbc7dbac886) actionview/lib/action_view/helpers/rendering_helper.rb:44:inrender' bloak (a4c1e81ffbbd) app/views/bloak/admin/posts/new.html.erb:17 rails (2dbc7dbac886) actionview/lib/action_view/base.rb:264:in public_send' rails (2dbc7dbac886) actionview/lib/action_view/base.rb:264:in_run' rails (2dbc7dbac886) actionview/lib/action_view/template.rb:207:in block in render' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:208:ininstrument' rails (2dbc7dbac886) actionview/lib/action_view/template.rb:488:in instrument_render_template' rails (2dbc7dbac886) actionview/lib/action_view/template.rb:201:inrender' rails (2dbc7dbac886) actionview/lib/action_view/renderer/template_renderer.rb:66:in block (2 levels) in render_template' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:206:inblock in instrument' rails (2dbc7dbac886) activesupport/lib/active_support/notifications/instrumenter.rb:58:in instrument' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:206:ininstrument' rails (2dbc7dbac886) actionview/lib/action_view/renderer/template_renderer.rb:60:in block in render_template' rails (2dbc7dbac886) actionview/lib/action_view/renderer/template_renderer.rb:76:inblock in render_with_layout' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:206:in block in instrument' rails (2dbc7dbac886) activesupport/lib/active_support/notifications/instrumenter.rb:58:ininstrument' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:206:in instrument' rails (2dbc7dbac886) actionview/lib/action_view/renderer/template_renderer.rb:75:inrender_with_layout' rails (2dbc7dbac886) actionview/lib/action_view/renderer/template_renderer.rb:59:in render_template' rails (2dbc7dbac886) actionview/lib/action_view/renderer/template_renderer.rb:11:inrender' rails (2dbc7dbac886) actionview/lib/action_view/renderer/renderer.rb:63:in render_template_to_object' rails (2dbc7dbac886) actionview/lib/action_view/renderer/renderer.rb:31:inrender_to_object' rails (2dbc7dbac886) actionview/lib/action_view/rendering.rb:135:in block in _render_template' rails (2dbc7dbac886) actionview/lib/action_view/base.rb:291:inin_rendering_context' rails (2dbc7dbac886) actionview/lib/action_view/rendering.rb:134:in _render_template' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/streaming.rb:231:in_render_template' rails (2dbc7dbac886) actionview/lib/action_view/rendering.rb:121:in render_to_body' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/rendering.rb:158:inrender_to_body' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/renderers.rb:141:in render_to_body' rails (2dbc7dbac886) actionpack/lib/abstract_controller/rendering.rb:27:inrender' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/rendering.rb:139:in render' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/instrumentation.rb:29:inblock (2 levels) in render' /Users/prakash/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/benchmark.rb:311:in realtime' rails (2dbc7dbac886) activesupport/lib/active_support/core_ext/benchmark.rb:14:inms' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/instrumentation.rb:29:in block in render' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/instrumentation.rb:98:incleanup_view_runtime' rails (2dbc7dbac886) activerecord/lib/active_record/railties/controller_runtime.rb:39:in cleanup_view_runtime' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/instrumentation.rb:28:inrender' meta-tags (2.18.0) lib/meta_tags/controller_helper.rb:22:in render' wicked_pdf (2.6.3) lib/wicked_pdf/pdf_helper.rb:18:inrender' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/implicit_render.rb:37:in default_render' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/basic_implicit_render.rb:7:insend_action' rails (2dbc7dbac886) actionpack/lib/abstract_controller/base.rb:222:in process_action' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/rendering.rb:165:inprocess_action' rails (2dbc7dbac886) actionpack/lib/abstract_controller/callbacks.rb:259:in block in process_action' rails (2dbc7dbac886) activesupport/lib/active_support/callbacks.rb:121:inblock in run_callbacks' rails (2dbc7dbac886) actiontext/lib/action_text/rendering.rb:23:in with_renderer' rails (2dbc7dbac886) actiontext/lib/action_text/engine.rb:69:inblock (4 levels) in ' rails (2dbc7dbac886) activesupport/lib/active_support/callbacks.rb:130:in instance_exec' rails (2dbc7dbac886) activesupport/lib/active_support/callbacks.rb:130:inblock in run_callbacks' rails (2dbc7dbac886) activesupport/lib/active_support/callbacks.rb:141:in run_callbacks' rails (2dbc7dbac886) actionpack/lib/abstract_controller/callbacks.rb:258:inprocess_action' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/rescue.rb:25:in process_action' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/instrumentation.rb:74:inblock in process_action' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:206:in block in instrument' rails (2dbc7dbac886) activesupport/lib/active_support/notifications/instrumenter.rb:58:ininstrument' rails (2dbc7dbac886) activesupport/lib/active_support/notifications.rb:206:in instrument' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/instrumentation.rb:73:inprocess_action' rails (2dbc7dbac886) actionpack/lib/action_controller/metal/params_wrapper.rb:261:in process_action' rails (2dbc7dbac886) activerecord/lib/active_record/railties/controller_runtime.rb:32:inprocess_action' rails (2dbc7dbac886) actionpack/lib/abstract_controller/base.rb:158:in process' rails (2dbc7dbac886) actionview/lib/action_view/rendering.rb:40:inprocess' rails (2dbc7dbac886) actionpack/lib/action_controller/metal.rb:223:in dispatch' rails (2dbc7dbac886) actionpack/lib/action_controller/metal.rb:294:indispatch' rails (2dbc7dbac886) actionpack/lib/action_dispatch/routing/route_set.rb:49:in dispatch' rails (2dbc7dbac886) actionpack/lib/action_dispatch/routing/route_set.rb:32:inserve' rails (2dbc7dbac886) actionpack/lib/action_dispatch/journey/router.rb:51:in block in serve' rails (2dbc7dbac886) actionpack/lib/action_dispatch/journey/router.rb:32:ineach' rails (2dbc7dbac886) actionpack/lib/action_dispatch/journey/router.rb:32:in serve' rails (2dbc7dbac886) actionpack/lib/action_dispatch/routing/route_set.rb:882:incall' rails (2dbc7dbac886) railties/lib/rails/engine.rb:529:in call' rails (2dbc7dbac886) railties/lib/rails/railtie.rb:226:inpublic_send' rails (2dbc7dbac886) railties/lib/rails/railtie.rb:226:in method_missing' rails (2dbc7dbac886) actionpack/lib/action_dispatch/routing/mapper.rb:22:inblock in ' rails (2dbc7dbac886) actionpack/lib/action_dispatch/routing/mapper.rb:51:in serve' rails (2dbc7dbac886) actionpack/lib/action_dispatch/journey/router.rb:51:inblock in serve' rails (2dbc7dbac886) actionpack/lib/action_dispatch/journey/router.rb:32:in each' rails (2dbc7dbac886) actionpack/lib/action_dispatch/journey/router.rb:32:inserve' rails (2dbc7dbac886) actionpack/lib/action_dispatch/routing/route_set.rb:882:in call' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/static.rb:25:incall' rack (3.0.7) lib/rack/tempfile_reaper.rb:20:in call' rack (3.0.7) lib/rack/etag.rb:29:incall' rack (3.0.7) lib/rack/conditional_get.rb:31:in call' rack (3.0.7) lib/rack/head.rb:15:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/http/permissions_policy.rb:39:in call' rails (2dbc7dbac886) actionpack/lib/action_dispatch/http/content_security_policy.rb:37:incall' rack-session (2.0.0) lib/rack/session/abstract/id.rb:272:in context' rack-session (2.0.0) lib/rack/session/abstract/id.rb:266:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/cookies.rb:687:in call' rails (2dbc7dbac886) activerecord/lib/active_record/migration.rb:621:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/callbacks.rb:29:in block in call' rails (2dbc7dbac886) activesupport/lib/active_support/callbacks.rb:101:inrun_callbacks' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in call' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/executor.rb:14:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in call' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:29:incall' web-console (4.2.0) lib/web_console/middleware.rb:132:in call_app' web-console (4.2.0) lib/web_console/middleware.rb:28:inblock in call' web-console (4.2.0) lib/web_console/middleware.rb:17:in catch' web-console (4.2.0) lib/web_console/middleware.rb:17:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/show_exceptions.rb:31:in call' rails (2dbc7dbac886) railties/lib/rails/rack/logger.rb:37:incall_app' rails (2dbc7dbac886) railties/lib/rails/rack/logger.rb:24:in block in call' rails (2dbc7dbac886) activesupport/lib/active_support/tagged_logging.rb:135:inblock in tagged' rails (2dbc7dbac886) activesupport/lib/active_support/tagged_logging.rb:39:in tagged' rails (2dbc7dbac886) activesupport/lib/active_support/tagged_logging.rb:135:intagged' rails (2dbc7dbac886) railties/lib/rails/rack/logger.rb:24:in call' sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/remote_ip.rb:92:in call' request_store (1.5.1) lib/request_store/middleware.rb:19:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/request_id.rb:28:in call' rack (3.0.7) lib/rack/method_override.rb:28:incall' rack (3.0.7) lib/rack/runtime.rb:24:in call' rails (2dbc7dbac886) activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb:29:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/server_timing.rb:61:in block in call' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/server_timing.rb:26:incollect_events' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/server_timing.rb:60:in call' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/executor.rb:14:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/static.rb:25:in call' rack (3.0.7) lib/rack/sendfile.rb:114:incall' rails (2dbc7dbac886) actionpack/lib/action_dispatch/middleware/host_authorization.rb:140:in call' rack-mini-profiler (3.1.0) lib/mini_profiler.rb:413:incall' rails (2dbc7dbac886) railties/lib/rails/engine.rb:529:in call' puma (6.2.2) lib/puma/configuration.rb:270:incall' puma (6.2.2) lib/puma/request.rb:98:in block in handle_request' puma (6.2.2) lib/puma/thread_pool.rb:340:inwith_force_shutdown' puma (6.2.2) lib/puma/request.rb:97:in handle_request' puma (6.2.2) lib/puma/server.rb:431:inprocess_client' puma (6.2.2) lib/puma/server.rb:233:in block in run' puma (6.2.2) lib/puma/thread_pool.rb:147:inblock in spawn_thread' Request Parameters:

None Toggle session dump Toggle env dump Response Headers:

None

poudelprakash commented 1 year ago

DateTime.now.to_s(:friendly_short) is no more valid

ruby: 3.2.2 rails: 7.1.0 alpha

nicbet commented 1 year ago

Fixed in 2a1c7b8930c8b2a7667185e9b731184f15acd106