RubyMine 2024.1 Help

Rails mountable engine projects

Define the path to the dummy directory

  1. In the Rails mountable engine project, open the Rails run/debug configuration for editing.

  2. In the Configuration tab, use the Dummy app option to specify the path to the test/dummy project directory.

    Configure dummy app
  3. Click OK to apply changes.

Embed a Rails mountable engine into a Rails application

  1. Open the target Rails project, where an engine should be embedded.

  2. Open the Gemfile and add the engine gem. For example, add the following line for the engine placed by the engines/blorgh path:

    gem 'blorgh', path: 'engines/blorgh'
  3. Open Config/routes.rb and add the line to make the engine's functionality accessible within an application, for example:

    mount Blorgh::Engine, at: "/blog"
Last modified: 11 February 2024