0

Is there any proper way to include a gem's/an engine's Gemfile in the host application so the listed gems are installed as well?

I know the gemspec file is supposed to do that but the Gemfile is changing quite frequently and it'd make my life easier if this was possible.

Cojones
  • 2,930
  • 4
  • 29
  • 41
  • As you said, the gemspec takes care of that. Why is that not working for you? – Martijn Aug 16 '13 at 09:26
  • The engine, that is being loaded is also a standalone application and as many developers work on it, gems are being added to the Gemfile and updating the gemspec accordingly is being forgotten pretty much always. It's just very annoying and would be nice to have only one file to manage the gems. – Cojones Aug 16 '13 at 09:29
  • Anyone knows if that's even possible? – Cojones Aug 23 '13 at 07:39

1 Answers1

0

Check out the answer in this thread:

Bundler - load multiple Gemfiles

Since a Gemfile is just Ruby code, you can include other Gemfiles.

Community
  • 1
  • 1
Martijn
  • 1,662
  • 15
  • 21
  • Thanks but I found that too. The problem is that I can't get the path to the gem's/engine's Gemfile. At least I don't know how, this doesn't work: `Gem.loaded_specs['engine_name'].full_gem_path` – Cojones Aug 23 '13 at 12:37