Elixir + Phoenixframework + Heroku (SpawnViewer Updated)


As an exercise for catching up latest Phoenixframework features, I’ve updated an fairly old heroku app to the latest (v0.4.0 -> v1.1.1) version. It was harder than expected, and leaving some struggle notes here.

  • Basically, the official document (http://www.phoenixframework.org/docs/heroku) covers the procedure to deploy phoenix application to heroku.
    • Struggled on the error around missing config/prod.secret.exs which is described in the document.
    • Also, there’re some configuration settings required around config/prod.exs and it seems difficult to apply heroku button with fixed parameters.
    • As phoenix requires node verison >= 5.0, and node_version in phoenix_static_buildpack.config needed to be specified by following the buildpack README description.
  • The controller’s json/2 expects data model which Poison can encode into JSON (changed from JSON data itself). I was using exjsx and needed to change the data accordingly as keyword lists couldn’t be encoded.
  • Reloading pages seems not working on Chrome + Ghostery, and just showing blank. It was confusing for isolating the issues.
  • New asset compilation with Brunch was a difficult for me, as I don’t much experience on JS developments. The js files using global variables (highlight.js) needed to be stored in vendor directory instead of js as in the following document.

Anyway, re-realized upgrading from actively developed v0.x.y framework is very hard…


Posted on January 1, 2016, in Elixir, Web. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: