##Introduction
This demo project is for showing a potential issue about the mount
statement in Hanami::Container.configure
. It's suspected that the container failed to load static files correctly for multiple apps if the mount path is not default.
##How to reproduce
This project is produced with the following steps:
hanami new static_path_test
hanami generate app another
hanami generate action another 'home#index'
- Place two different js files with the name
test.js
in theassets/javescripts
folders in the two apps. Load them in the template ofanother
app with<%= javascript 'test' %>
- In
config/environment.rb
, mount theanother
app to'/'
. Please see the file for details - Run the server. The js file will be loaded from
web
app, which is not expected - However, if you comment the
require
statement, the js file will be loaded correctly. (Please empty thepublic
folder when restarting the server)