From cfe30cee3e1a40dabe95b8f1c7d8a58629ea5277 Mon Sep 17 00:00:00 2001 From: Abhay Nikam Date: Thu, 18 Apr 2019 00:37:15 +0530 Subject: Adds a warning message for action text installer if application pack is missing. --- actiontext/lib/templates/installer.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actiontext/lib') diff --git a/actiontext/lib/templates/installer.rb b/actiontext/lib/templates/installer.rb index a8000eb9fc..a15ada92bb 100644 --- a/actiontext/lib/templates/installer.rb +++ b/actiontext/lib/templates/installer.rb @@ -29,4 +29,17 @@ if APPLICATION_PACK_PATH.exist? append_to_file APPLICATION_PACK_PATH, "\n#{line}" end end +else + warn <<~WARNING + WARNING: Action Text can't locate your JavaScript bundle to add its package dependencies. + + Add these lines to any bundles: + + require("trix") + require("@rails/actiontext") + + Alternatively, install and setup the webpacker gem then rerun `bin/rails action_text:install` + to have these dependencies added automatically. + + WARNING end -- cgit v1.2.3