We were looking for something else and found this error A LOT in the production.log. I don't know what it means, but errors are never good.
AbstractController::ActionNotFound (The action 'files' could not be found for WagnController):
actionpack (3.2.16) lib/abstract_controller/base.rb:116:in `process'
actionpack (3.2.16) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.16) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.16) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.16) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:73:in `call'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:36:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:608:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.5) lib/rack/etag.rb:23:in `call'
rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.16) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.16) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.16) lib/active_support/callbacks.rb:405:in `_run__636616972__call__832156855__callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.16) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.16) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
airbrake (3.1.15) lib/airbrake/rails/middleware.rb:13:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.16) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.16) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.16) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.16) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.16) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
airbrake (3.1.15) lib/airbrake/user_informer.rb:16:in `_call'
airbrake (3.1.15) lib/airbrake/user_informer.rb:12:in `call'
railties (3.2.16) lib/rails/engine.rb:484:in `call'
railties (3.2.16) lib/rails/application.rb:231:in `call'
railties (3.2.16) lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:in `block (3 levels) in start_threads'
This appears 2434 in 2 days. The same error but for 'assets' 110 times.
There are 3000 instances of a similar error. production.log is up to 50MB in 2 days from these errors. How do we fix them?
What's the url of a request causing this error?
Here's my theory: the requests look something like "/wagn/files/blah" or "/wagn/assets/blah". Those made sense in your previous installation (where Wagn was installed in the wagn/ directory) but not in the current one, where it's at the root.
Most likely these are broken requests coming from external sources, like crawlers or bookmarks or tweets or anything that stored a url to the site.
In other words: your problem isn't a noisy log file; your problem is that you're getting a ton of requests to the site that are currently getting server errors as a result!
If my theory is correct, I would recommend an apache rewrite rule that redirects /wagn/files/blah to /files/blah.
Hmm. We thought it was somehow doing that on its own, since it actually directs people to the page regardless. I had thought we needed to do a redirect, but then when we tried going to the old URLs, they still worked, so it seemed like it wasn't necessary. Will try that.
you may have been seeing cached versions of those pages. It's worth trying a hard-reload.
Where we should make the change? There are .htacess files in a few different places. Do we have to reinstall the gem? Does RewriteRule /wagn/files(.*) /files$1 sound about right.
You shouldn't have to reinstall the gem; basically Wagn shouldn't be involved in the process at all. This is about apache configuration; a rewrite rule would modify the request before it ever reaches Wagn. I don't know the apache syntax off hand.
it occurs to me, by the way, that you may have been thrown off by the fact that /wagn/ would still work. That's because there are legacy routes to support that as basically an alternate url for reading a card. But /wagn/files/... was never supported.
The problem was that there are two .htaccess files, and both of them live inside the wagn gem. Because we don't know how this whole gem-wrapped-in-passenger business really works, or anything about gems, we have no idea: a) which one, if either, I should be editing; b) how to get it recognized once I've edited it.