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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With