You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can define assets for precompilation in engine.rb:
initializer "blorgh.assets.precompile" do |app|
app.config.assets.precompile += %w( admin.js admin.css )
end
Instead of using the asset pipeline helpers like stylesheet_link_tag and javasript_include_tag in the Application Layout, the code is using a url method from the helpers. This is less compatible with some deploy environments than the asset pipeline.
A workaround is to extract the js and css assets from the gem and copy them into your host application under public/split. By doing so, the deployed split dashboard code will be able to find http://domain.com/split/reset.css, for example. I've implemented this workaround in my codebase and it does the trick.
I may open a PR in the near future to fix this up, but in the meantime I wanted to share this information with the community in case others struggle with this.
The text was updated successfully, but these errors were encountered:
When deploying to a production environment, the
/split
assets are not made available on the expected path. For example,/split/reset.css
is a 404.This seems to be because the engine does not use the recommended way of referring to assets for engines. Specifically, this section:
Instead of using the asset pipeline helpers like
stylesheet_link_tag
andjavasript_include_tag
in the Application Layout, the code is using aurl
method from the helpers. This is less compatible with some deploy environments than the asset pipeline.A workaround is to extract the js and css assets from the gem and copy them into your host application under
public/split
. By doing so, the deployed split dashboard code will be able to findhttp://domain.com/split/reset.css
, for example. I've implemented this workaround in my codebase and it does the trick.I may open a PR in the near future to fix this up, but in the meantime I wanted to share this information with the community in case others struggle with this.
The text was updated successfully, but these errors were encountered: