aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/app_base.rb
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-11-08 12:15:27 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-11-08 13:24:12 +0900
commit67db41aa7f17c2d34eb5a914ac7a6b2574930ff4 (patch)
treee0c98751d15eadc90e5af611e24c22c89abe9e69 /railties/lib/rails/generators/app_base.rb
parentdaf77db65d9d5e295ee3ba86605988875cb834e4 (diff)
downloadrails-67db41aa7f17c2d34eb5a914ac7a6b2574930ff4.tar.gz
rails-67db41aa7f17c2d34eb5a914ac7a6b2574930ff4.tar.bz2
rails-67db41aa7f17c2d34eb5a914ac7a6b2574930ff4.zip
Do not run `active_storage:install` when bundle install is skipped
In order to execute the `rails` command, need to run bundle install in advance. Therefore, if skipped bundle install, `rails` command may fail and should not do it.
Diffstat (limited to 'railties/lib/rails/generators/app_base.rb')
-rw-r--r--railties/lib/rails/generators/app_base.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 59ca4c849f..60e54cc365 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -461,7 +461,11 @@ module Rails
def run_active_storage
unless skip_active_storage?
- rails_command "active_storage:install", capture: options[:quiet]
+ if bundle_install?
+ rails_command "active_storage:install", capture: options[:quiet]
+ else
+ log("Active Storage installation was skipped. Please run 'bin/rails active_storage:install' to install Active Storage files.")
+ end
end
end