• Stars
    star
    429
  • Rank 101,032 (Top 2 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple asset-pipeline wrapper for Vue.js by Evan You

vuejs-rails

Gem Gem

About

Rails 3.1+ asset-pipeline gem to provide Vue.js

Package Versions

  • vue v2.5.13
  • vue-router v3.0.1
  • vue-resource v1.3.5
  • vuex v3.0.1

Compatibility

Setup

Have in your Gemfile:

gem 'vuejs-rails'

And in your application.js manifest:

//= require vue
//= require vue-router (optional)
//= require vue-resource (optional)
//= require vuex (optional)

If your application.js requires TurboLinks (a default setting for new Rails apps), you should strongly consider disabling it, as it will cause pages to load without reloading the Javascript.

In app/views/layouts/application.html.erb, move this line from the head of the document to the end of the body:

<%= javascript_include_tag 'application' %>

You may write your Vue.js code directly in your views using <script> tags, or in a separate Javascript file (recommended).

Full and minified assets versions

Starting from version '>= 2.3.2', by default, gem uses minified versions in production and full versions otherwise.

You can override this behavior by setting Vue.development_mode flag:

Vue.development_mode = true

You can do it in e.g. config/initializers/vue_config.rb, your environment initializers.

Make sure to clean your assets cache (rake tmp:cache:clear) after changing state of the flag.

Contributing

Contributions are welcome, please follow GitHub Flow

License

MIT

More Repositories

1

poll

Voting done simply in real-time
Ruby
168
star
2

diy

A modern cross-platform JavaScript library & only 18 bytes
CSS
75
star
3

kevlar

Secrets created by kevlar.io are kept until they are accessed, they are then deleted permanently from the server.
Ruby
56
star
4

wedding-on-rails

The open-source code for my wedding website
Ruby
44
star
5

riotjs-rails

A simple asset-pipeline wrapper for riot.js by moot
JavaScript
27
star
6

spaaaccccce

Make your URL's longer with the Aperture Science Remote URL Lengthener
Ruby
20
star
7

atom-prettify

Atom Package to prettify your HTML
CoffeeScript
17
star
8

seqease

Easing for linear videos or image sequences
CoffeeScript
14
star
9

nodecraft

JavaScript
13
star
10

node-sms-drone

Control the Parrot Mini Drone with SMS
CoffeeScript
6
star
11

alfred-workflow-package-manager

A WIP package manager for Alfred workflows
Ruby
6
star
12

pushitrealgood

Push for pusher - Built at the simpleweb hack night (sorry for the hacky code)
Ruby
5
star
13

dial-a-drone

Need to control a drone? Just dial-a-drone
JavaScript
5
star
14

geo-pusher

A location aware chat application that uses Pusher
HTML
4
star
15

device-orientation

A website to help debug device orientation.
HTML
3
star
16

rusic-pintrest-clone

JavaScript
3
star
17

LeapTouch

Make a normal screen a touch screen with the power of the Leap Motion
CoffeeScript
3
star
18

docker-slanger

A docker file for Slanger
Shell
2
star
19

dash-pi-hue

Amazon Dash button control for the Philips Hue bulbs
Ruby
2
star
20

spotify-album-app

CoffeeScript
2
star
21

dotfiles

My dotfile configuaration
Vim Script
2
star
22

Alfred-Workflow-html2haml

An Alfred workflow to convert html in your clipboard to haml
Ruby
2
star
23

alfred-workflow-package-manager-workflow

The workflow for installing Alfred Workflows from http://workflow.lab.io
Ruby
2
star
24

whaletonjohn

2
star
25

benvatar

Add avatars to Twitter accounts for lols
Ruby
2
star
26

balena-xmas

WS281x lights powered by RPi Zero W using Balena
Python
2
star
27

Social-Buttons

An open design to provide consistant and brand compliant social buttons
1
star
28

rusic-theme-360k

JavaScript
1
star
29

bootstrap_playground

JavaScript
1
star
30

angularjs-slides

JavaScript
1
star
31

luagravitygame

Lua
1
star
32

slack-buffer

Post updates to Buffer from slack
JavaScript
1
star
33

conduct

Group decisions made easy
Ruby
1
star
34

bootstrap-datepicker

JavaScript
1
star
35

rusic-theme-jsfiddle

JavaScript
1
star
36

peer-js-devices

Handy helper classes to help you manage and maintain connections with peer.js
1
star
37

node-launcher

A node.js application to control the Thunder USB Missile Launcher
CoffeeScript
1
star
38

southville-js-weinre

JavaScript
1
star
39

mm

JavaScript
1
star
40

playground-EnnU6uFB

Tech.io playground
JavaScript
1
star