[Play-Scala 2.4.0] Weirdness with Assets not found in Dev vs Live?

115 views
Skip to first unread message

Roberto Tyley

unread,
May 28, 2015, 5:20:32 AM5/28/15
to play-fr...@googlegroups.com
This isn't exactly a bug report yet, but I seem to be getting some weirdness with my static assets on a Play 2.4 app when running in Dev mode. One specific CSS asset isn't working in Dev, but is in live:


Other CSS assets, like this one, work in both environments:


This was working on a week or so ago when I had an earlier RC version of Play 2.4.


Apologies for the lack of detail, will investigate further when I get the chance.

Roberto

Will Sargent

unread,
May 28, 2015, 1:42:09 PM5/28/15
to play-fr...@googlegroups.com
You don't have a lib/octicons folder in your project, it looks like.




--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/2523676a-24aa-4d8e-974f-f9b8ba321b23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roberto Tyley

unread,
May 28, 2015, 5:55:47 PM5/28/15
to play-fr...@googlegroups.com

On 28 May 2015 6:42 pm, "Will Sargent" <will.s...@typesafe.com> wrote:

You don't have a lib/octicons folder in your project, it looks like.


The octicons are brought in by a webjar:

https://github.com/rtyley/submitgit/blob/0bc765f1/build.sbt#L37

...and I guess it would be possible for me to be using the wrong path for where the library dumps the file down - but then why would it work in Live, and not Dev?

Roberto

Will Sargent

unread,
May 28, 2015, 7:12:57 PM5/28/15
to play-fr...@googlegroups.com
Ah, it's a webjar.  That makes sense. Did you deploy your assets?

You should be running "assets" or "web-pipeline" and then you'll see it in target/web/public/main/lib/octicons.  Then the URL is:


So there's an extra octicons in there.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.

Roberto Tyley

unread,
May 29, 2015, 4:48:20 AM5/29/15
to play-fr...@googlegroups.com


On Friday, May 29, 2015 at 12:12:57 AM UTC+1, Will Sargent wrote:
Ah, it's a webjar.  That makes sense. Did you deploy your assets?

You should be running "assets" or "web-pipeline" and then you'll see it in target/web/public/main/lib/octicons.  Then the URL is:


Hey, that extra 'octicons' does get things working on localhost. What's kind of surprising to me, though, is that both paths return a CSS response in production:

HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
Etag: "ff87d1c0f58bad8e1830593a293a7aef0770b15b"
Content-Type: text/css; charset=utf-8
Cache-Control: public, max-age=3600
Last-Modified: Mon, 27 Apr 2015 19:16:46 GMT
Content-Length: 11500
Date: Fri, 29 May 2015 08:39:09 GMT
Via: 1.1 vegur

HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
Etag: "a6017cb48fb348ac1a1d0abd1082576351affe18"
Content-Type: text/css; charset=utf-8
Cache-Control: public, max-age=3600
Last-Modified: Thu, 21 May 2015 22:33:14 GMT
Content-Length: 11584
Date: Fri, 29 May 2015 08:39:20 GMT
Via: 1.1 vegur

...though they are different sizes, so I guess one corresponds to an older version of the CSS. It's like there's a CDN or caching proxy between me and the app, though I'm not aware of one. I don't think Heroku is doing that for me...

In any case, this seems more like a quirk of my hosting setup or connection, so not a problem with Play 2.4.

Roberto
Reply all
Reply to author
Forward
0 new messages