Learn to include vendor css/js files in Rails 4

In order to include vendor assets such as CSS/JavaScript files you need to utilize Ruby on Rails Asset Pipeline. In order to implement this inclusion, you need to add file name with the require and/or @import statements in your application.js and application.css files

Here is an example of application.js file inclusions

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require turbolinks
// Vendor Files
//= require contact
//= require gmaps
//= require html5shiv
//= require jquery.prettyPhoto
//= require jquery.scrollUp.min
//= require main
//= require price-range

Here is an example of application.css.scss file inclusions

@import "bootstrap";
@import "font-awesome.min.css";
@import "prettyPhoto.css";
@import "price-range.css";
@import "animate.css";
@import "main.css";
@import "responsive.css";

Featured pages

Ruby

Set of Ruby Object Oriented Programming Language tutorials that cover such topics as Ruby strings, …

Rails

Rails Framework tutorial teaches you how to utilize de facto framework of choice for Ruby developme…

Ruby Duck Typing

“If an object quacks like a duck just go ahead and treat it as a duck” – this fun…

Regular Expressions

Ruby uses the =~ operator to check any given string against regular expression. For example, a stri…

Credit Card Number

Every last digit of any credit card is a check sum digit that is determined by all digits in front …

Ruby Arrays

Ruby Programming Language has built in support for Arrays. Arrays help you define some of the compl…

Ruby Hashes

Hashes are very similar to arrays in Ruby and hashes interface is similar to Ruby array interface. …

Ruby Code Block

Ruby is very unique language when it comes to code blocks. You can simply pass a code block to a me…