Module: ViteRails::CLI::Build
- Defined in:
- lib/vite_rails/cli.rb
Instance Method Summary collapse
- #call(**options) ⇒ Object
-
#ensure_rails_init ⇒ Object
Internal: Attempts to initialize the Rails application.
Instance Method Details
#call(**options) ⇒ Object
9 10 11 12 |
# File 'lib/vite_rails/cli.rb', line 9 def call(**) ensure_rails_init super end |
#ensure_rails_init ⇒ Object
Internal: Attempts to initialize the Rails application.
15 16 17 18 19 |
# File 'lib/vite_rails/cli.rb', line 15 def ensure_rails_init require File.('config/environment', Dir.pwd) rescue StandardError, LoadError => error $stderr << "Unable to initialize Rails application before Vite build:\n\n\t#{ error. }\n\n" end |