Open andrii-baran-nfgp opened 1 year ago
Workaround
# config/application.rb
require 'dry/cli' # <-- top of file
Hi Andrii!
Seems unusual, ViteRuby::CLI
already requires dry/cli
. Could you provide a minimal reproduction?
Out of chance, are you using the classic autoloader instead of zeitwerk?
Hi @ElMassimo
The issue is in conflict between Forwardable#delegate
and activesupport's delegate
methods. If load dry/cli
before rails will load activesupport
everything works as expected.
You can run ViteRuby::CLI
from rails console to reproduce the issue
You can run ViteRuby::CLI from rails console to reproduce the issue
That doesn't cause an error in all Rails applications, please provide a minimal reproduction.
bundle update vite_ruby
.Description š
I am getting this error during deployment
rake db:migrate
dry/cli/command.rb
Reproduction š
Vite Ruby Info
_Run `bin/rake vite:info` and provide the output:_ ``` bin/vite present?: true vite_ruby: 3.3.4 vite_rails: 3.0.15 rails: 7.0.6 node: v19.8.1 npm: 9.5.1 yarn: 1.22.19 pnpm: ruby: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] installed packages: webadmit@1.0.0 /Users/horizon/WebAdMIT āāā¬ @vitejs/plugin-vue2@2.2.0 ā āāā vite@4.4.7 deduped āāā¬ vite-plugin-ruby@3.2.2 ā āāā vite@4.4.7 deduped āāā vite@4.4.7 ```Logs š
Output
_Run `DEBUG=vite-plugin-ruby:* bin/vite dev` or `DEBUG=vite-plugin-ruby:* bin/vite build` and provide the output:_ ``` vite-plugin-ruby:config { vite-plugin-ruby:config base: '/assets/', vite-plugin-ruby:config build: { vite-plugin-ruby:config emptyOutDir: true, vite-plugin-ruby:config sourcemap: true, vite-plugin-ruby:config commonjsOptions: { transformMixedEsModules: true }, vite-plugin-ruby:config assetsDir: 'assets', vite-plugin-ruby:config manifest: true, vite-plugin-ruby:config outDir: '../../public/assets', vite-plugin-ruby:config rollupOptions: { input: [Object], output: [Object] } vite-plugin-ruby:config }, vite-plugin-ruby:config envDir: '/Users/horizon/WebAdMIT', vite-plugin-ruby:config root: '/Users/horizon/WebAdMIT/app/frontend', vite-plugin-ruby:config server: { vite-plugin-ruby:config fs: { allow: [Array], strict: true }, vite-plugin-ruby:config host: 'localhost', vite-plugin-ruby:config https: false, vite-plugin-ruby:config port: 3036, vite-plugin-ruby:config strictPort: true, vite-plugin-ruby:config hmr: { clientPort: 3036 } vite-plugin-ruby:config }, vite-plugin-ruby:config entrypoints: { vite-plugin-ruby:config 'entrypoints/application.js': '/Users/horizon/WebAdMIT/app/frontend/entrypoints/application.js', vite-plugin-ruby:config 'entrypoints/application.scss': '/Users/horizon/WebAdMIT/app/frontend/entrypoints/application.scss', vite-plugin-ruby:config 'entrypoints/components.js': '/Users/horizon/WebAdMIT/app/frontend/entrypoints/components.js', vite-plugin-ruby:config 'entrypoints/dropdown.js': '/Users/horizon/WebAdMIT/app/frontend/entrypoints/dropdown.js', vite-plugin-ruby:config 'entrypoints/trix.js': '/Users/horizon/WebAdMIT/app/frontend/entrypoints/trix.js' vite-plugin-ruby:config } vite-plugin-ruby:config } +0ms ```