WEBrick log shows information about a file it can't find public assets missing.js?

Support Ticket

+status
+tags
 

Clicking on the sprocket on the top right of each card produces no effects

This problem is linked and has the same solution with:

Failing to precompile assets on ARM devices (raspberry pi 2)

 

wagn server

 

then when I load a page it shows this among other data:

 

Processing by CardController#asset as JS

  Parameters: {"filename"=>"missing"}

Routing assets through Wagn. Recommend symlink from Deck to Wagn gem using 'rake wagn:update_assets_symlink'

Sent file /home/pi/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/wagn-1.14.9/public/assets/missing.js (0.9ms)

exception = ActionController::MissingFile: Cannot read file /home/pi/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/wagn-1.14.9/public/assets/missing.js

  Rendered text template (0.0ms)

Completed 404 Not Found in 16.8ms (Views: 3.1ms | ActiveRecord: 0.0ms)

 

My first guess is that this will be fixed with a combination of `wagn update` (in the deck directory) and /delete/*all+*script+*machine_output (in the browser).

 

If that doesn't work I'm not sure I can diagnose the problem without more info, but I can get us started, and with more info I'm sure we can figure things out.  Can you tell me:

  • The url that gave you this problem (should be just a little earlier in the log)
  • The raw content of *all+*script  (eg /*all+*script.txt?view=raw)
  • Any javascript errors you're seeing in the browser
  • Any customizations you've made to <head> in your browser.

The first message you see up there: "Routing assets through wagn" should generally not appear if you're using `wagn update`. If that's not working, it may mean your public directory itself is a symlink.  That was briefly the way things were handled, but now it should really be a directory, whereas public/assets should be a symlink.

 

The second message is confusing.  Hoping the above will fix it, but if not we'll do more sleuthing.

 

--Ethan McCutchen.....2015-03-22 03:29:34 +0000

No customizations just the plain wagn seed install.

 

I've checked public, it is really a directory. public/assets is a link.

 

Raw content of *all+*script

 

/[/[script: jquery/]/]
/[/[script: tinymce/]/]
/[/[script: slot/]/]
/[/[script: card menu/]/]
/[/[script: jquery helper/]/]
/[/[script: ace/]/]

 

Console output when inspecting the page, happens every time I refresh:

 

/[Error/] Failed to load resource: the server responded with a status of 404 (Not Found) (missing.js, line 0)
/[Error/] TypeError: undefined is not a function (evaluating 'wagn.setTinyMCEConfig')
global code (Menu, line 21)
/[Error/] ReferenceError: Can't find variable: $
global code (Menu, line 26)
* without the excape character /
--Mir S......2015-03-24 10:01:25 +0000

Managed to fix it. Apparently it's a known issue on the Raspberry Pi 2 with therubyracer.

More here:

http://stackoverflow.com/questions/29243824/ruby-on-raspberry-pi-2-with-raspbian-webrick-crash/29244506#29244506

 

Solution:

gem uninstall therubyracer

apt-get install nodejs

cd myapp

rm -rf tmp -remove your app's tmp folder

nano Gemfile -put a # before like that says "gem 'therubyracer'"

 

Restart the pi

Try to access it again, give it a little time, it has to recompile it's assets.

 

--Mir S......2015-03-25 03:02:01 +0000

Thanks for all the persistence and the extra info, Mircea. I think perhaps the biggest takeaway here is that we need to do a better job of detecting javascript runtime problems. This should be a lot easier for us to diagnose!

--Ethan McCutchen.....2015-03-25 15:25:59 +0000

By the way, I'm hoping to get 1.15 out at the end of the week, getting very close there. I would recommend that you not spend any time on styling before that upgrade, which will include Bootstrap support.

--Ethan McCutchen.....2015-03-25 15:27:07 +0000

Super! Just noticed wagn org is running 1.15pre2 the CSS and layout changes are looking great on the retina display! Minor bugs here and there, should I report them or wait?

--Mir S......2015-03-29 01:03:11 +0000

The Javascript error problem is not going to go away, so whatever we can do to make debugging easier is a good thing. When it does throw errors, they don't get captured anywhere, sometimes not even by the browser (unless you are debugging, so you have to really be looking for them). Usually things just fail silently. Now that more of that is wagneerable, it can only get harder.

--Gerry Gleason.....2015-03-29 14:16:35 +0000

Mircea - yes, please let us know if you're seeing bugs!

 

Gerry - if you're willing to have a look at making sure missing runtimes get captured, that would be awesome.

 

Generally, if you're editing javascript / coffee script cards by hand and have errors, you should get notified in the html web page where that's happening. IMO, it's ok if the compilation fails quietly in this case and just keeps the old output.

 

The tricky part here is that it happens during an update and with valid javascript but it's failing because of the lack of a runtime. This should fail very loudly and clearly.

--Ethan McCutchen.....2015-03-30 17:05:21 +0000