I am moving the rails application to the phoenix framework.
I added some javascript (let's say some.js ) and css files to web/static/js and web/static/css dir.
<%= static_path(@conn, "/js/some.js") %> on the first page of page/index.html.eex does not work. He raised an exception (dev env):
Phoenix.Router.NoRouteError at GET /static/js/some.js no route found for GET /static/js/some.js (VisualTrader.Router)
If I copied some.js to priv/static/js dir, it worked. So what did I miss? I thought the asset pipeline worked as one on rails that automatically compiled resources.
The following are my phoenix environments:
Elixir version
elixir -v Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] Elixir 1.3.0-dev (187f4f8)
Phoenix Version
defp deps do [{:phoenix, "~> 1.1.2"}, ...
javascript elixir phoenix-framework brunch
Jack tang
source share