Have some problems with boilerplate code generated with phx.new constructor.
First, in following line in endpoint.ex json_decoder: Phoenix.json_library() Compiler doesn’t understand .json_library(), says function is undefined or private. I checked boilerplate, generated with phoenix.new constructor, instead of .json_library() Poison is set as a json_decoder there. I switched to Poison in phx.new as well and that part compiles fine.
Then, when I’m starting the server with phx.server, seems it compiles as well, but when I’m requesting a page, it crashes. Logs say Router.Helpers.static_push/2 is undefined or private
I’m running Elixir 1.6.4 with Erlang/OTP 19 on Windows 8. Environment was set up according to instructions in book “Programming Phoenix”. Erlang/OTP was installed with a package from Erlang Solutions.
Any ideas why phx.new constructor is out of sync from the rest of development environment? Or maybe there’s some other issue I’m not aware of? Anyway, thanks in advance, guys
Yes. I’ve installed Phoenix following instructions in “Programming Phoenix” book and then added phx.new generator as described in Phoenix github page. Now checking versions with mix phoenix.new/phx.new --version and getting above numbers.
@outlog, @l00ker: that’s it, was following “… from unreleased versions” instructions. Installing phx_new from archives repo solve the problem. Thanks, guys, much appreciated ))
Sorry, @l00ker, your first reply was the “problem solver”, didn’t get the difference between repos you provided and I was using.
@NobbZ: now I have raw phx_new dir in .mix/archives, w/o any version numbers.