ActionController::RoutingError


(Wesley Chia Wei Lin) #1

Hey guys,
I just update discourse to stable upstream. I use unicorn to deploy Discourse
However, after updating, when I start discourse, I encountered the following on browser

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (zh_TW.js, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (preload_store.js, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (vendor.js, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (application.js, line 0)
[Error] ReferenceError: Can't find variable: PreloadStore
	global code (top:486)
[Error] ReferenceError: Can't find variable: Ember
	global code (top:500)
[Error] ReferenceError: Can't find variable: Discourse
	global code (top:508)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (browser-update.js, line 0)

and I checked log/production.log, I saw

ActionController::RoutingError (No route matches [GET] "/javascripts/application.js")
/usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.15/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'

Any ideas? really have no idea what config or anything else can cause this problem…
Thanks guys


(Jeff Atwood) #2

Try updating again from command line. SSH in and

cd /var/discourse
git pull
./launcher rebuild app

(Wesley Chia Wei Lin) #3

where is launcher? Does it exist in discourse folder?


(Wesley Chia Wei Lin) #4

Oh I get it, it’s the command to restart a docker container.
But I’m not using docker, how am I gonna do the rebuild process?

I found out today that these files are files that have to be precompile?
It there any chance that we have to precompile these file ourselves before we launch discourse app?


(Rafael dos Santos Silva) #5

The only supported way of running discourse in production is trough docker.

If you are just setting a development environment, the assets are served on development by default.


(Wesley Chia Wei Lin) #6

Thanks guys, I ends up use docker to rebuild my project.
It works fine, now I just need to dump data from old postgres to new one.