Giter Site home page Giter Site logo

Comments (6)

princemaple avatar princemaple commented on July 29, 2024

Looks like you are using the classic setup. You are most likely missing the root. Please check the first usage option in readme.

from phoenix_swoosh.

TheArrowsmith avatar TheArrowsmith commented on July 29, 2024

I'm not sure what you mean by missing the root. The :root option is provided by use EmailDemoWeb, :view in the normal Phoenix way:

defmodule EmailDemoWeb do
  # …

  def view do
    quote do
      use Phoenix.View,
        root: "lib/email_demo_web/templates",
        namespace: EmailDemoWeb

If you're suggesting that Swoosh is unable to find the templates at all, that's obviously not the case - just look in the screenshot. You can see that the contents of my text template ("This is a plaintext email") has been loaded within the %Phoenix.LiveView.Rendered{} struct.

The proximate cause of the problem is that the %Phoenix.LiveView.Rendered{} is being passed to :erlang.io_list_binary(), which doesn't know how to handle this type of argument. But I don't understand why this is happening.

from phoenix_swoosh.

princemaple avatar princemaple commented on July 29, 2024

You are right. My apologies. I'm currently travelling overseas and on the phone most of the time, and won't have the opportunity to pull down your code to try it. Might be a good idea to ask on the forum or in slack.

from phoenix_swoosh.

princemaple avatar princemaple commented on July 29, 2024

That being said, I do think you should start generating phoenix projects with 1.7 and take a look at the 1.7 issue in this repo.

from phoenix_swoosh.

TheArrowsmith avatar TheArrowsmith commented on July 29, 2024

Well yes, but this is for an existing 1.6 app, not a greenfield project, and I can't upgrade to 1.7 just yet.

from phoenix_swoosh.

princemaple avatar princemaple commented on July 29, 2024

Ah okay. 😅

from phoenix_swoosh.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.