How to integrate plugin code?

take an example of a plugin. http://codecanyon.net/item/multipurpose-bookshelf-slider-jquery-plugin/1985655 I put it in the vendor/assets folder, so vendor/assets/multipurpose_bookshelf_slider/js/* vendor/assets/multipurpose_bookshelf_slider/css/* In the manifest files, I tried variations of application.css.scss @import "multipurpose_bookshelf_slider/css/bookshelf_slider"; @import "css/skin01"; application.js //= require multipurpose_bookshelf_slider/js/jquery.easing.1.3.js //= require multipurpose_bookshelf_slider/js/jquery.bookshelfslider.min.js Do I need to specify a load path? It should be possible to import a direct folder without having to take files and split them up in the vendor/assets/js/ and vendor/assets/css/ folders - doing that would be messy and annoying

Posted about 5 years ago by Jeehyo Ahn
Posted about 5 years ago by Jeehyo Ahn

I solved it. It turns out that simply creating a folder underneath vendor/assets/ adds it to the load paths. But it's compiled when the server starts, so I simply had to restart my server to have it work properly.

I found that I could check the load paths by going into rails console and typing Rails.application.config.assets.paths to view all the paths. I saw that the folder was loaded in the path. So I realized I just had to restart the server

0
Posted about 5 years ago by Alex Yang

Great - glad you were able to solve it and thanks for following up!

0
Posted about 5 years ago by Jeehyo Ahn

The guides http://edgeguides.rubyonrails.org/asset_pipeline.html say to take this location

vendor/assets/multipurpose_bookshelf_slider/phonebox.js

and reference it like so

//= require phonebox.

but that doesn't seem to work.

The browser error shows that the asset path is not in the list of recognized asset paths, so the question is how to add it.

0
Posted about 5 years ago by Jeehyo Ahn

oh that didn't come to easy to read at all.

Basically, I'm asking about custom load paths for vendor folders by just dragging and dropping them into the vendor folder instead of moving the files into the folder structure set by default rails conventions.

0