<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 24, 2015, at 9:44 PM, Steven Majewski <<a href="mailto:sdm7g@virginia.edu" class="">sdm7g@virginia.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=windows-1252" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">The resources that are failing all seem to be hardwired in less stylesheets.</div><div class="">It would seem that the RAILS_RELATIVE_URL_ROOT patch is unnecessary — the paths</div><div class="">that are variable were already getting prefixed properly, and that can’t do anything</div><div class="">about the hardwired paths in these stylesheets. </div><div class=""><br class=""></div><div class="">As a hack, it appears to work to edit the hardwired paths in the less stylesheets. </div><div class="">( At least for frontend app, I haven’t tried the same changes to public yet. ) </div><div class=""><br class=""></div><div class="">Unfortunately, I’m not familiar enough with lessc and how it’s called in Rails</div><div class="">to know if it’s possible to pass the path prefix in as a variable. </div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>Reading the docs on the Rails asset pipeline, it seems the suggested way to do something </div><div>like that ( their example is with sass, not less, but it should be the same sort of thing )</div><div>is to use .erb templating and that the pipeline will successively process extensions: </div><div>   icons.less.erb  ==>  icons.less ==> icons.css </div><div><br class=""></div><div><br class=""></div><div>I tried adding the fronted_prefix in icons.less.erb, but my build failed. </div><div><br class=""></div><div><br class=""></div><div>Thinking I may have had a syntax error, I tried just renaming “icons.less" to “icons.less.erb",</div><div>but the build still fails with a not very informative stack track:</div><div>( I’ve also tried renaming to “icons.css.less.erb” with result the same. )</div><div><br class=""></div><div><br class=""></div><div><div>frontend:war:</div><div>     [echo] Precompiling Rails assets (this can take a little while...)</div><div>     [java] rake aborted!</div><div>     [java] LoadError: no such file to load -- action_controller/railtie</div><div>     [java] org/jruby/RubyKernel.java:1071:in `require'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/frontend/config/application.rb:4:in `(root)'</div><div>     [java] org/jruby/RubyKernel.java:1071:in `require'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/jruby-complete-1.7.18.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/jruby-complete-1.7.18.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/frontend/Rakefile:1:in `(root)'</div><div>     [java] org/jruby/RubyKernel.java:1087:in `load'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/frontend/Rakefile:5:in `(root)'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/gems/gems/rake-10.4.2/lib/rake/rake_module.rb:1:in `(root)'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/gems/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/gems/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/gems/gems/rake-10.4.2/lib/rake/application.rb:94:in `load_rakefile'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/gems/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/gems/gems/rake-10.4.2/lib/rake/application.rb:77:in `run'</div><div>     [java] /projects/Archivespace/dcs-archivesspace/build/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'</div><div>     [java] org/jruby/RubyKernel.java:1087:in `load'</div><div>     [java] /usr/local/var/rbenv/versions/jruby-1.7.11/bin/rake:23:in `(root)'</div><div class=""><br class=""></div></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div>For this deployment, I will probably go back to just editing the hardwired urls in those stylesheets.</div><div>Another possible option may be to just serve up the static files directly from apache —</div><div>not using the proxy to rails app. The question there is whether I can get the public and frontend </div><div>assets to merge together nicely. </div><div><br class=""></div><div><br class=""></div><div>— Steve. </div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Here are the paths that I changed in frontend app. </div><div class="">I expect to find a similar set in the public app stylesheets.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">— Steve. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; color: rgb(105, 40, 40); background-color: rgb(255, 206, 182);" class=""><b class="">diff --git a/frontend/app/assets/stylesheets/archivesspace/icons.less b/frontend/app/assets/stylesheets/archivesspace/icons.less</b></div><div style="margin: 0px; color: rgb(105, 40, 40); background-color: rgb(255, 206, 182);" class=""><b class="">index 773070d..49edb32 100644</b></div><div style="margin: 0px; color: rgb(105, 40, 40); background-color: rgb(255, 206, 182);" class=""><b class="">--- a/frontend/app/assets/stylesheets/archivesspace/icons.less</b></div><div style="margin: 0px; color: rgb(105, 40, 40); background-color: rgb(255, 206, 182);" class=""><b class="">+++ b/frontend/app/assets/stylesheets/archivesspace/icons.less</b></div><div style="margin: 0px; color: rgb(0, 161, 174); background-color: rgb(255, 206, 182);" class="">@@ -1,10 +1,10 @@</div><div style="margin: 0px; background-color: rgb(255, 206, 182);" class=""> @font-face {</div><div style="margin: 0px; background-color: rgb(255, 206, 182);" class="">   font-family: 'icomoon';</div><div style="margin: 0px; color: rgb(176, 36, 18); background-color: rgb(255, 206, 182);" class="">-  src:url('/assets/icomoon/icomoon.eot?-z7cehr');</div><div style="margin: 0px; color: rgb(176, 36, 18); background-color: rgb(255, 206, 182);" class="">-  src:url('/assets/icomoon/icomoon.eot?#iefix-z7cehr') format('embedded-opentype'),</div><div style="margin: 0px; color: rgb(176, 36, 18); background-color: rgb(255, 206, 182);" class="">-  url('/assets/icomoon/icomoon.woff?-z7cehr') format('woff'),</div><div style="margin: 0px; color: rgb(176, 36, 18); background-color: rgb(255, 206, 182);" class="">-  url('/assets/icomoon/icomoon.ttf?-z7cehr') format('truetype'),</div><div style="margin: 0px; color: rgb(176, 36, 18); background-color: rgb(255, 206, 182);" class="">-  url('/assets/icomoon/icomoon.svg?-z7cehr#icomoon') format('svg');</div><div style="margin: 0px; color: rgb(0, 164, 0); background-color: rgb(255, 206, 182);" class="">+  src:url('/admin/assets/icomoon/icomoon.eot?-z7cehr');</div><div style="margin: 0px; color: rgb(0, 164, 0); background-color: rgb(255, 206, 182);" class="">+  src:url('/admin/assets/icomoon/icomoon.eot?#iefix-z7cehr') format('embedded-opentype'),</div><div style="margin: 0px; color: rgb(0, 164, 0); background-color: rgb(255, 206, 182);" class="">+  url('/admin/assets/icomoon/icomoon.woff?-z7cehr') format('woff'),</div><div style="margin: 0px; color: rgb(0, 164, 0); background-color: rgb(255, 206, 182);" class="">+  url('/admin/assets/icomoon/icomoon.ttf?-z7cehr') format('truetype'),</div><div style="margin: 0px; color: rgb(0, 164, 0); background-color: rgb(255, 206, 182);" class="">+  url('/admin/assets/icomoon/icomoon.svg?-z7cehr#icomoon') format('svg');</div><div style="margin: 0px; background-color: rgb(255, 206, 182);" class=""> }</div><div style="margin: 0px; background-color: rgb(255, 206, 182); min-height: 16px;" class=""> <br class="webkit-block-placeholder"></div><div style="margin: 0px; background-color: rgb(255, 206, 182);" class=""> .icomoon {</div><div style="margin: 0px; color: rgb(105, 40, 40); background-color: rgb(255, 206, 182);" class=""><b class="">diff --git a/frontend/app/assets/stylesheets/themes/default/bootstrap.less b/frontend/app/assets/stylesheets/themes/default/bootstrap.less</b></div><div style="margin: 0px; color: rgb(105, 40, 40); background-color: rgb(255, 206, 182);" class=""><b class="">index 25150dd..bdf1817 100644</b></div><div style="margin: 0px; color: rgb(105, 40, 40); background-color: rgb(255, 206, 182);" class=""><b class="">--- a/frontend/app/assets/stylesheets/themes/default/bootstrap.less</b></div><div style="margin: 0px; color: rgb(105, 40, 40); background-color: rgb(255, 206, 182);" class=""><b class="">+++ b/frontend/app/assets/stylesheets/themes/default/bootstrap.less</b></div><div style="margin: 0px; color: rgb(0, 161, 174); background-color: rgb(255, 206, 182);" class="">@@ -1,4 +1,4 @@</div><div style="margin: 0px; background-color: rgb(255, 206, 182);" class=""> // override icon paths</div><div style="margin: 0px; background-color: rgb(255, 206, 182);" class=""> @import "bootstrap/variables";</div><div style="margin: 0px; color: rgb(176, 36, 18); background-color: rgb(255, 206, 182);" class="">-@icon-font-path: "/assets/";</div><div style="margin: 0px; color: rgb(0, 164, 0); background-color: rgb(255, 206, 182);" class="">+@icon-font-path: "/admin/assets/";</div><div style="margin: 0px; background-color: rgb(255, 206, 182);" class=""> @import "bootstrap/bootstrap";</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></blockquote></div><br class=""></body></html>