lib/tapioca/loaders/loader.rb in tapioca-0.11.1 vs lib/tapioca/loaders/loader.rb in tapioca-0.11.2
- old
+ new
@@ -46,14 +46,18 @@
end
eager_load_rails_app if eager_load
rescue LoadError, StandardError => e
say(
- "Tapioca attempted to load the Rails application after encountering a `config/application.rb` file, " \
+ "\nTapioca attempted to load the Rails application after encountering a `config/application.rb` file, " \
"but it failed. If your application uses Rails please ensure it can be loaded correctly before " \
"generating RBIs.\n#{e}",
:yellow,
)
+ if e.backtrace
+ backtrace = T.must(e.backtrace).join("\n")
+ say(backtrace, :cyan) # TODO: Check verbose flag to print backtrace.
+ end
say("Continuing RBI generation without loading the Rails application.")
end
sig { void }
def load_rails_engines