简体   繁体   中英

Bundle a rails 4 application into a gem?

I am currently developing a rails 4 based media streaming app and wanted to know if i could have the rails app as a kind of source code and bundle it into a gem for distribution? is there some sort of easy solution for this? or do i have to roll my own?

From your description, I think you can do this via an Engine. From the Rails docs:

Engines can be considered miniature applications that provide functionality to their host applications.

...

Engines are also closely related to plugins where the two share a common lib directory structure and are both generated using the rails plugin new generator. The difference being that an engine is considered a "full plugin" by Rails as indicated by the --full option that's passed to the generator command, but this guide will refer to them simply as "engines" throughout. An engine can be a plugin, and a plugin can be an engine.

Read more at http://guides.rubyonrails.org/engines.html

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