Skip to content

A barebones template of a Rails 6 app with a Vue 3 frontend

Notifications You must be signed in to change notification settings

jdbrant3/rails_vue_template

Repository files navigation

Vue on Rails: Vue 3 Frontend with Rails 6 Backend

Hi Max.

This is a barebones template of a Vue on Rails application, using Rails 6.x, Vue 3.x, Ruby 3.x, and Webpacker 5.x.

To install necessary gems and dependencies run:

(this requires yarn, so install it if necessary)

bin/setup

Then to start the server for frontend and backend:

in one tab:

rails server

then in another tab:

./bin/webpack-dev-server

You will be greeted with a Vue page saying "Hello World"

From there you are free to build your new Vue on Rails application to your specific needs.

The webpack has been configured to recgonize *.vue files.

Vue components can be added to the app/javascript/src/components file, just make sure to update the router.