I am working on an existing Ruby on Rails project. While one of the engine is successfully referencing a library which reside in a different engine, the other is not able to do so.
I am very confused about how the whole dependency resolution works in Ruby. Also is there any additional facts that one need to know about how Rails resolve the dependencies between various engines?
I know my knowledge around these are limited at present and If I really had a good grasp over these I will be able to figure whats going on. Can any of you point me to resources that will help me learn these if not explain in detail here?
Engines are usually gems. Each gem defines its own set of dependencies via a gemspec (if an engine is just included in a Rails app, it might define it’s own Gemfile (bundler))
Dependencies for gem are well discussed here: http://guides.rubygems.org/patterns/#declaring-dependencies
Basically it sounds like Engine B is dependent on Engine A so Engine B should declare Engine A as a dependency. Any engine that references objects from Engine A should declare Engine A as a dependency. Otherwise, you are likely to experience load order issues.