0

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?

4

1 回答 1

2

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

于 2012-06-11T11:17:22.647 回答