sometimes we get a 500 error when we try to post a new article, I've check the logs and I found
that Error R14 (Memory quota exceeded)
keeps repeating all over again.
Rendered admin/articles.html.erb within layouts/admin (13.3ms)
ActionView::Template::Error (undefined method `gsub' for nil:NilClass):
22: <span id="row-<%= doc.id %>" data-toggle="dropdown" aria-expanded="false" class='btn dropdown-toggle glyphicon glyphicon-align-justify'></span>
23: <ul class="dropdown-menu dropdown-menu-right" role="menu">
24: <li><%= link_to t(:edit, default: 'Edit'), edit_category_doc_path(doc.category.id, doc.id, lang: I18n.locale) %></li>
25: <li><%= link_to t(:delete, default: 'Delete'), doc, data: {confirm: t(:delete_confirm, default: 'Please confirm you really want to DELETE this')}, method: :delete, remote: true, class: 'less-important' %></li>
26: <li><%= link_to t(:view_on_site, default: 'View on Site'), category_doc_path(doc.category, doc), {target: "_blank"} %></li>
27: </ul>
28: </div>
app/models/doc.rb:56:in `to_param'
app/views/admin/articles.html.erb:25:in `block in _app_views_admin_articles_html_erb___2712434889001218502_70267151824380'
app/views/admin/articles.html.erb:12:in `_app_views_admin_articles_html_erb___2712434889001218502_70267151824380'
app/controllers/admin_controller.rb:29:in `articles'
Started GET "/admin/content/5/articles" for 80.64.37.217 at 2016-02-20 10:10:57 +0000
Parameters: {"category_id"=>"5"}
!!! initiate tracker without client id !!!
Processing by AdminController#articles as HTML
User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Category Load (0.5ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = $1 ORDER BY "categories"."id" ASC LIMIT 1 [["id", 5]]
Doc Load (0.6ms) SELECT "docs".* FROM "docs" WHERE "docs"."category_id" = $1 ORDER BY rank ASC, title ASC [["category_id", 5]]
(1.4ms) SELECT COUNT(*) FROM "doc_translations" WHERE "doc_translations"."doc_id" = $1 AND "doc_translations"."locale" = $2 [["doc_id", 7], ["locale", "en"]]
(0.5ms) SELECT COUNT(*) FROM "doc_translations" WHERE "doc_translations"."doc_id" = $1 AND "doc_translations"."locale" = $2 [["doc_id", 7], ["locale", "es"]]
Completed 500 Internal Server Error in 45ms (ActiveRecord: 6.5ms)
I've tried to track down the issue but I've never worked with Ruby nor Ruby on Rails.