rubyist
rubyist

Reputation: 409

Install VueJS components in a rails project

I'm trying to get a set of VueJS components i.e. VueStrap, installed in a Rails project. VueJS is setup and working correctly.

Typically I would use npm to install VueStrap if I was doing this outside of a Rails project.

How can I install VueStrap in a rails project?

Upvotes: 1

Views: 476

Answers (3)

mutantkeyboard
mutantkeyboard

Reputation: 1714

If you don't want to go by any of these routes mentioned above, you can always set up the frontend as a separate entity.

You can set up CORS using rack-cors gem, and use it to communicate with VueJS frontend.

That way Rails doesn't have to be concerned about the specific webpack/yarn/gulp, or whatever setup you have for your frontend logic.

Upvotes: 2

Prasanth_Rubyist
Prasanth_Rubyist

Reputation: 458

Hope you this will help you vuejs with webpacker gem installation doubts

**Steps to install Vuejs via webpack in rails app**

Upvotes: 0

Graham Slick
Graham Slick

Reputation: 6870

You should take a look at the webpacker gem. You can then use webpack + yarn very easily with Rails.

Upvotes: 2

Related Questions