Skip to content

Getting Started ​

If you are interested to learn more about Vite Ruby before trying it, check out the Introduction.

If you are looking for configuration options, check out the configuration reference.

Installation 💿 ​

Add this line to your application's Gemfile:

ruby
gem 'vite_rails'

And then run:

bundle install

Setup 📦 ​

Run bundle exec vite install, which:

Tag Helpers

If you are using a different layout file, follow the Tag Helpers section to add them manually.

Running your first example 🏃‍♂️ ​

Run bin/vite dev to start the Vite development server.

Restart your Rails or Rack web server before visiting any page, and you should see a printed console output:

Vite ⚡️ Ruby

You can now start writing modern JavaScript apps with Vite! 😃

Check an example app running on Heroku.

Not seeing anything?

Check the Troubleshooting section for common problems.

Further Configuration 🧩 ​

Check the Recommended Plugins section for more information about plugins and useful libraries.

Official Vite.js Plugins

When using Vue, React, or Svelte, check out Vite's official plugins.

Contact ✉️ ​

Please visit GitHub Issues to report bugs you find, and GitHub Discussions to make feature requests, or to get help.

Don't hesitate to ⭐️ star the project if you find it useful!

Using it in production? Always love to hear about it! 😃

Released under the MIT License.