Merge pull request #38463 from jonathanhefner/fix-rails-new-dev

Fix `rails new --dev`
This commit is contained in:
Kasper Timm Hansen 2020-02-17 00:33:32 +01:00 committed by GitHub
commit 0cb6c27344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -21,7 +21,7 @@ module Rails
require_application_and_environment!
load_generators
ARGV.shift
ARGV.replace(args) # set up ARGV for third-party libraries
Rails::Generators.invoke generator, args, behavior: :invoke, destination_root: Rails::Command.root
end

View File

@ -12,10 +12,10 @@ module Rails
formatted_rake_tasks.map(&:first)
end
def perform(task, *)
def perform(task, args, config)
require_rake
ARGV.unshift(task) # Prepend the task, so Rake knows how to run it.
ARGV.replace([task, *args]) # set up ARGV for Rake
Rake.application.standard_exception_handling do
Rake.application.init("rails")

View File

@ -1,6 +1,7 @@
# frozen_string_literal: true
require "shellwords"
require "active_support/core_ext/kernel/reporting"
require "active_support/core_ext/string/strip"
module Rails