I have a ruby on rails app that needs to be gem-ified. Jeweler, helps create basic rubygems. However, how do I package a rails app as a gem? I have a main app that requires my rails app as a gem. I cannot integrate them as the main rails app is to be used as a management app to control smaller apps, running in it as gems/engines.
Since Rails 3.0 any Rails app is an Engine. For wrap your application to a gem you should:
Your file lib/my_gem.rb should contain next code:
module MyGem class Engine < Rails::Engine; end end
UPD
Or be better if you will use mountable engines:
$ rails plugin new MyGem
It generates mountable engine with dummy app for tests and gemspec.
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.