I have a mixin I want to include in a few different classes in a Volt app. Pertinent structure as follows:
Including file path: app/component_1/models/my_model.rb
Included file path: app/component_2/mixins/my_mixin.rb
Here's what I've tried:
require "#{Volt.root}/app/component_2/mixins/my_mixin"
yields this error in the server output when loading a page: SyntaxError: Cannot handle dynamic require
require "app/component_2/mixins/my_mixin"
yields this error when starting the server: in `require': cannot load such file
require_relative "../../component_2/mixins/my_mixin"
yields this error in the server output when loading a page: Opal::Builder::MissingRequire: A file required by "app.rb" wasn't found. can't find file: "../../component_2/mixins/my_mixin"
require "./app/component_2/mixins/my_mixin"
yields this error in the javascript console when loading a page: Uncaught RuntimeError: no routes match path: /
Not sure what else to try?