简体   繁体   中英

Install rails assets in a ruby gem

I am transforming a ruby plugin to a ruby gem. In the plugin I was able to run

rake gem_name:install

This would install javascript and images into the rails assets directory. Can I automate this, so when i include the gem in mijn gemfile, this is all included automatically?

What is the way of doing this?

You don't need install your styles and scripts into the rails app in rails 3.1 and 3.2.

Just put them into app/assets , lib/assets or vendor/assets ; and add Rails::Engine class to you gem (it can be empty).

Guides

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM