I think you will need to put haml in the gemspec engine as a dependency so that the connected one sets haml in the target application (and appears in its Gemfile.lock). Something like that:
Gem::Specification.new do |s| s.add_dependency(%q<haml>, [">= 0"]) end
I just tested this on one of my engines. Without dependencies in .gemspec, he did not install haml in the target application (did not appear in Gemfile.lock). After I added haml to gemspec as a dependency, it appears:
PATH remote: /rails_plugins/mine/my_engine specs: my_engine (0.0.0) formtastic haml inherited_resources settingslogic sqlite3-ruby GEM remote: http://rubygems.org/ specs:
If you use a jeweler, it will automatically add dependencies to the gemspec depending on what is in your Gemfile .. it even adds developmentement_dependency if you have a group defined in your Gemfile. I just looked briefly at enginex, so I don’t know if it has a similar rake task to build gemspec.
This may help clarify some things:
http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
johnmcaliley
source share