{"id":2684,"date":"2022-08-30T15:26:55","date_gmt":"2022-08-30T15:26:55","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/06\/rails-3-engine-static-assets-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:26:55","modified_gmt":"2022-08-30T15:26:55","slug":"rails-3-engine-static-assets-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/rails-3-engine-static-assets-collection-of-common-programming-errors\/","title":{"rendered":"Rails 3 Engine &amp; Static assets-Collection of common programming errors"},"content":{"rendered":"<p>I had a similar problem mounting a Rails 3.1 engine. I was receiving blank assets in stage and production.<\/p>\n<p>I found a solution at http:\/\/jonswope.com\/2010\/07\/25\/rails-3-engines-plugins-and-static-assets\/comment-page-1\/#comment-87 and tweaked it to suit Rails 3.1 asset locations:<\/p>\n<pre><code>initializer \"static assets\" do |app|\n  app.middleware.insert_before ::Rack::Lock, ::ActionDispatch::Static, \"#{root}\/app\/assets\"\nend\n<\/code><\/pre>\n<p>I imagine there is a more elegant way but my effort today didn&#8217;t yield anything substantial.<\/p>\n<p id=\"rop\"><small>Originally posted 2014-02-06 03:56:53. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I had a similar problem mounting a Rails 3.1 engine. I was receiving blank assets in stage and production. I found a solution at http:\/\/jonswope.com\/2010\/07\/25\/rails-3-engines-plugins-and-static-assets\/comment-page-1\/#comment-87 and tweaked it to suit Rails 3.1 asset locations: initializer &#8220;static assets&#8221; do |app| app.middleware.insert_before ::Rack::Lock, ::ActionDispatch::Static, &#8220;#{root}\/app\/assets&#8221; end I imagine there is a more elegant way but my effort [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2684","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2684"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2684\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}