c2b195e1e3
When development tools try to load Rails components, they sometimes end up loading files that will error out since a dependency is missing. In these cases, the tooling can catch the error and change its behaviour. However, since the warning is printed directly to `$stderr`, the tooling cannot catch and suppress it easily, which ends up causing noise in the output of the tool. This change makes Rails print these warnings using `Kernel#warn` instead, which can be suppressed by the tooling.
9 lines
209 B
Ruby
9 lines
209 B
Ruby
# frozen_string_literal: true
|
|
|
|
begin
|
|
require "builder"
|
|
rescue LoadError => e
|
|
warn "You don't have builder installed in your application. Please add it to your Gemfile and run bundle install"
|
|
raise e
|
|
end
|