I'm including a few local engines from within my Rails app into the app's Gemfile
# In the Gemfile...
# Bundles an internal engine from ./engines into the Gemfile and
# loads the engine's dependencies from the .gemspec file
def load_engine(gem_name, dirname = nil)
dirname ||= gem_name
# Load the engine into the app
gem gem_name, path: "engines/#{dirname}"
# Include the engine's dependencies
gemspec path: "engines/#{dirname}/"
end
# Load engines
load_engine('engine_one')
load_engine('engine_two')
When I run bundle commands I get the following warning in the console:
Your Gemfile lists the gem engine_one (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem engine_two (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Can anybody explain what's going on here?