Unable to install vite_rails with rails minimal installation #72
-
Hey guys, I've created new rails app with minimal flag like ❯ bundle exec vite install
Creating binstub
Check that your vite.json configuration file is available in the load path:
No such file or directory @ rb_sysopen - /tmp/theapp/config/vite.json
Creating configuration files
Installing sample files
Installing js dependencies
? Choose the agent › - Use arrow-keys. Return to submit.
❯ npm
yarn
pnpm
Adding files to .gitignore
Vite ⚡️ Ruby successfully installed! 🎉 During
When I hit ❯ bin/vite dev
/home/ekrem/.rvm/gems/ruby-3.0.1/gems/vite_ruby-1.2.8/lib/vite_ruby/runner.rb:18:in `rescue in run': ❌ The vite binary is not available. Have you installed Vite? (ViteRuby::MissingExecutableError)
If I add |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Ekrem! During the install command, the library uses It should be possible to make that command interactive in the future, at the moment based on your experience it skips installation which is not ideal. The prompt would be skipped if you already had a A workaround for clean installs would be to create a |
Beta Was this translation helpful? Give feedback.
Hi Ekrem!
During the install command, the library uses
@antfu/ni
in order to infer which package manager you are using.It should be possible to make that command interactive in the future, at the moment based on your experience it skips installation which is not ideal.
The prompt would be skipped if you already had a
yarn.lock
file (which is always there on a "regular" Rails installation).A workaround for clean installs would be to create a
yarn.lock
or similar file for your preferred package manager, and runbundle exec vite install
later.