Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Svelte component from application layout #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

floehopper
Copy link
Member

I see the following error when viewing the home page:

Started GET "/" for 127.0.0.1 at 2024-09-20 12:54:55 +0100
Processing by HomeController#show as HTML
  Rendering layout layouts/application.html.erb
  Rendering home/show.html.svelte within layouts/application
""
""
  Rendered home/show.html.svelte within layouts/application (Duration: 575.3ms | GC: 0.1ms)
  Rendered layout layouts/application.html.erb (Duration: 577.8ms | GC: 0.1ms)
Completed 500 Internal Server Error in 580ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.1ms)

ActionView::Template::Error (Missing partial ./_Footer with {:locale=>[:en], :formats=>[:html], :variants=>[:client, :server], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder, :svelte]}.

Searched in:
  * "~/Code/freerange/vanilla-rails-v7.2.1-with-actionview-svelte-handler/app/views"
  * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/turbo-rails-2.0.9/app/views" * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/actiontext-7.2.1/app/views" * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/actionmailbox-7.2.1/app/views" ):

Causes: ActionView::MissingTemplate (Missing partial ./_Footer with {:locale=>[:en], :formats=>[:html], :variants=>[:client, :server], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder, :svelte]}.

Searched in:
  * "~/Code/freerange/vanilla-rails-v7.2.1-with-actionview-svelte-handler/app/views"
  * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/turbo-rails-2.0.9/app/views" * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/actiontext-7.2.1/app/views" * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/actionmailbox-7.2.1/app/views" )
    22:     <%= yield %>
    23:   </body>
    24:
    25:   <%= render "./Footer" %>
    26: </html>

app/views/layouts/application.html.erb:25

I see the following error when viewing the home page:

    Started GET "/" for 127.0.0.1 at 2024-09-20 12:54:55 +0100
    Processing by HomeController#show as HTML
      Rendering layout layouts/application.html.erb
      Rendering home/show.html.svelte within layouts/application
    ""
    ""
      Rendered home/show.html.svelte within layouts/application (Duration: 575.3ms | GC: 0.1ms)
      Rendered layout layouts/application.html.erb (Duration: 577.8ms | GC: 0.1ms)
    Completed 500 Internal Server Error in 580ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.1ms)

    ActionView::Template::Error (Missing partial ./_Footer with {:locale=>[:en], :formats=>[:html], :variants=>[:client, :server], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder, :svelte]}.

    Searched in:
      * "~/Code/freerange/vanilla-rails-v7.2.1-with-actionview-svelte-handler/app/views"
      * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/turbo-rails-2.0.9/app/views"
      * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/actiontext-7.2.1/app/views"
      * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/actionmailbox-7.2.1/app/views"
    ):

    Causes:
    ActionView::MissingTemplate (Missing partial ./_Footer with {:locale=>[:en], :formats=>[:html], :variants=>[:client, :server], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder, :svelte]}.

    Searched in:
      * "~/Code/freerange/vanilla-rails-v7.2.1-with-actionview-svelte-handler/app/views"
      * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/turbo-rails-2.0.9/app/views"
      * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/actiontext-7.2.1/app/views"
      * "~/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/actionmailbox-7.2.1/app/views"
    )
        22:     <%= yield %>
        23:   </body>
        24:
        25:   <%= render "./Footer" %>
        26: </html>

    app/views/layouts/application.html.erb:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant